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

Java Program Output and Formatting Guide

The document outlines two practical programming exercises in Java. The first exercise requires writing a program that displays three specific messages, while the second involves printing the value of an integer variable. Instructions for formatting and output placement are also provided.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views2 pages

Java Program Output and Formatting Guide

The document outlines two practical programming exercises in Java. The first exercise requires writing a program that displays three specific messages, while the second involves printing the value of an integer variable. Instructions for formatting and output placement are also provided.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

200170107063

Practical 1 (Times New Roman size 15 Bold, Center Align)


Aim: Write a Program that displays Welcome to Java, Learning Java Now and
Programming is fun. (Times New Roman size 12 Bold, Left align)

Code:

(Times New Roman, Size 12, Left align)

Output:

Screenshot of Output

Note:

1. Start new practical on new page.


2. Keep output after code.
3. Take print out on single side of page.

1
200170107063

Practical 1
Aim: Write a program to print a value of integer variable.

Code:

public class A
{

public static void main(String args[])


{
int num;
num=100;
[Link]("This is num: "+num);
num=num*2;
[Link]("This is num *2 is ");
[Link](num);
}
}

Output:

You might also like