Difference between println() and print()

Difference between println() and print()

Different ways to print output in java

Way 1: println()

Below is the way to print elements of array on separate line

Output:

Way 2: print()

Below is the way to print elements of array in one line

Output:

Help others by sharing the content!

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.