dimanche 22 février 2015

java \n is printed, should break line?

I have a string that when it see's \n it should break line. However when I print it too screen it actually shows the \n as characters.




  1. My file has a line such as q1. what is your name? \n a.bob \n b.jim




  2. I then store that result into a String when its read from the file




  3. I then send it over RMI to a client which it is then displayed. It should be


    q1. what is your name?



    a. bob
    b. jim



However it all is printed on one line exactly how it is in the file.


Aucun commentaire:

Enregistrer un commentaire