0% found this document useful (0 votes)
23 views4 pages

Oops Lab2

Uploaded by

subham
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)
23 views4 pages

Oops Lab2

Uploaded by

subham
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
You are on page 1/ 4

ASSIGNMENT-2

QUESTION – 1:-

Add two floating point numbers by taking input using java.util.scanner class and
java.io.BufferedReader class.

CODE:-

OUTPUT:-
ASSIGNMENT-2
QUESTION – 2:-
Write a program to find surface area and volume of cylinder Using Constructors – Keyboard
Input or Command Line Input.

CODE:-

OUTPUT:-

QUESTION – 3:-
Create a class named First, make instance variable[intx], instance method [void show()] and
put main inside that class and use the instance variable and method from main().

CODE:-

OUTPUT:-

QUESTION – 4:-
Create a class; make its instance variable and instance method. Use them from main() which
is declared in a different class.

CODE:-

OUTPUT:-

You might also like