Computer Science, asked by rutuandhare35, 3 months ago

What will be the output of the following program?
class HelloWorld
{
public static void main(String t[])
{
System.out.println("Hello World");
System.out.println("Hello Universe");
}
}
}​

Answers

Answered by anindyaadhikari13
4

Required Answer:-

Given Co‎de:

class HelloWorld    {

   public static void main(String t[]) {

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

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

   }

}

Output:

Hello World

Hello Universe

Explanation:

  • The println() function is used to print messages on the screen and moves the cursor to the next line.
  • So, after displaying the first message i.e., "Hello World", the cursor is moved to the next line.
  • Again, a new message i.e., "Hello Universe" is displayed on the screen with a new line.

See the attachment for output.

•••♪

Attachments:
Answered by kamalrajatjoshi94
0

Answer:

I have attached the program with the output see it.

Attachments:
Similar questions