Difference between println() and print() methods in java

Println():- used to print the statements in console but the control is there in next line.

Example:-

System.out.println(“Sravyainfotech”);

System.out.println(“core java”);

Output: –             Sravyainfotech

Core java

Print():- used to print the statement in console and the control is present in the same line.

Example:-

System.out.print(“Sravyainfotech”);

System.out.print(“core java”);

Output:-SravyaInfotechcorejava

Published by Atul maurya

i am student of computer science & engineering .i want to become a java developer. my hobby is to learn programming language in easy way.

Leave a comment

Design a site like this with WordPress.com
Get started