Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 5

Programming Java Lab

Lab# 01
ID# 19303027
Section: A

1
1.1

Output: Welcome to Java! The Program starts the execution from the main method. The statement
displays “Welcome to Java! “To the console.

1.2

Output: The Program starts the execution from the main method. The three statement displays
“Programming is fun! , Fundamentals First, Problem Driven “ To the console.

2
1.3

Output: The Program starts the execution from the main method. The statement evaluates the
expression and displays the result.

3
1.4 Show Syntax Errors

Output: The program has two syntax error. (1)missing keyword void before main. (2) The string is not
closed properly.

1.5 Show Runtime Errors

Output: The Program starts the execution from the main method. Integer 1 cannot be divided by 0. The
statement causes a runtime error.

4
1.6

Output: The Program starts the execution from the main method. Calculating Area and Perimeter of a
Cricle by using JAVA programing.

1.7

Output: The Program starts the execution from the main method. Calculating Area and Perimeter of a
Rectangle by using JAVA programing.

You might also like