in Serial monitor I choose newline, data can show but if I choose no line ending data wouldn't show....
any body can tell me what is differences???
The difference is, as should be obvious, the line ending that is sent after your data.
Your code, that you couldn't be bothered to post, clearly expects some kind of packet terminator.