In my servlet I gave both out.print and out.write. but both prints in the browser.
What is the exact difference between these two and when
write() method only writes characters to stream(or console) but does not print, while print() method writes and print it on stream (or console).
System.out.write(97);
System.out.print('j');
first statement writes character 97 i.e 'a' on console but does not print, while second statement prints 'a' which is written already on stream and 'j' which is passed in print() method.