Computer Science, asked by TheVerifiedQuestion, 1 month ago

class Simple {
public static void main (String args[]){
System.out.println("Hello World");
}
}

explain this​

Answers

Answered by singhdhairya005
2

Answer:

the ans is

Explanation:

class Simple {

public static void main (String args[]){

System.out.println("Hello World");

}

}

Answered by BrainlyProgrammer
6

Given Códe:-

class Simple {

public static void main (String args[]){

System.out.println("Hello World");

}

}

Output:-

Hello World

Explaination:-

  • The program simply prints "Hello World"

Note:-

  • System.out.println() and System.out.print() both are used to print the message/get the output
  • The only difference between them is that System.out.println() prints the message and moves the cursor to the next line while System.out.print() prints the message and the cursor remains in the same line

Sample Example:-

System.out.println("Brainly");

System.out.print("is ");

System.out.println("Amazing");

Here the output will be ...

Brainly

is Amazing

Similar questions