//print and create new line after
System.out.println("text");
System.out.println(String);
//You can use any variable type, not just strings, although
//they are the most common
//Print without creating a new line
System.out.print("text");
System.out.print(String);
class Hello
{
public static void main(String args[])
{
System.out.println("Hello Kinjal!");
}
}
System.out.println("print your String");
System.out.print(46); // prints on the same line
System.out.println("Tree"); // prints code on a new line
System.out.println("LUL");
System.out.println(String someString); /** Can take in other types as well such as integers (ints) */
System.out.println("Hello!"); //prints then ends line
System.out.print("Hello!!");//prints without line spacing
public class SimplestJavaProgram {
public static void main(String[] args) {
System.out.println("Hello World");
}
}