0% found this document useful (0 votes)
2 views2 pages

JPR Manual Answers Experiment 1

The document presents three Java programs that demonstrate the use of 'System.out.println' and 'System.out.print' methods. Each program outputs a greeting message to the console, with variations in formatting. The first program uses 'println' for a single message, while the second uses 'print' for consecutive messages on the same line, and the third uses 'println' for multiple lines.

Uploaded by

Riya Patil
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views2 pages

JPR Manual Answers Experiment 1

The document presents three Java programs that demonstrate the use of 'System.out.println' and 'System.out.print' methods. Each program outputs a greeting message to the console, with variations in formatting. The first program uses 'println' for a single message, while the second uses 'print' for consecutive messages on the same line, and the third uses 'println' for multiple lines.

Uploaded by

Riya Patil
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

Experiment No:-1

Program 1:
Code:
class Sy
{
public static void main(String args[])
{
System.out.println("Hello Sy B Welcome to JPR");
}
}
Output:

Program 2:
Code:
class Sy
{
public static void main(String args[])
{
System.out.print("Hello Sy B Welcome to JPR");
System.out.print("Hello Sy B");
}
}
Output:

Program 3:
Code:
class Sy
{
public static void main(String args[])
{
System.out.println("Hello Sy B Welcome to JPR");
System.out.println("Hello Sy B");
}
}
Output:

You might also like