Skip to content

Instantly share code, notes, and snippets.

@rmg007
Created October 3, 2022 19:52
Show Gist options
  • Save rmg007/2d86e28116c95d180c3b166f08097165 to your computer and use it in GitHub Desktop.
Save rmg007/2d86e28116c95d180c3b166f08097165 to your computer and use it in GitHub Desktop.
Learn and dive deep into Java Course. print vs println lecture
public class Main {
public static void main(String[] args) {
System.out.print("Hello ");
System.out.print("World");
// println-> add new line at the end
System.out.println("First Line");
System.out.println("Second Line");
System.out.println(10);
System.out.println(9.75);
System.out.println(1 + 4);
System.out.println("Hello " + "World");
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment