I have string like
\"I am a boy\".
I want to print like this way
Can anybody help me?<
It can be done several ways. I am mentioning 2 simple ways.
Very simple way as below:
System.out.println("I\nam\na\nboy");
It can also be done with concatenation as below:
System.out.println("I" + '\n' + "am" + '\n' + "a" + '\n' + "boy");