OOP-J(3140705) IMP

click here for OOP-J Study Material

UNIT-1

1. Explain any three features of java.

2.Define following.
1) Byte code
2) Java Virtual Machine
3) Unicode
4) JRE
5) JDK

3.Compare Object oriented programming with sequential programming.

UNIT-2

1. Explain command line argument with help of example.

2. Explain break and continue statements with example.

3.Attempt any one.
   a) Write a program for Fibonacci series in java.
   b) Write a program to find the given number is Armstrong              or not.
    c) Write a program for factorial of a given number.

UNIT-3

1. Explain method overloading with example.

2.Explain command line argument.Write a program to take three numbers as command line argument.Display the maximum among them ?

3.Write a program which takes five numbers as command line argument from user , store them in one dimensional array & display count of negative number.

4.Explain command line argument.Write a program to Fibonacci series as command line argument.Display the maximum among them ?

5.(i) Create a two dimensional array. Instantiate and Initialize it.
(ii) Differentiate String class and StringBuffer class.

6. Explain Ragged Array with help of example.

UNIT-4

1. What is Contstructor in Java? How many types of Constructors are there in JAVA ? Explain with example.

2.Justify:
1. Why we declare main() method as public and static member.
2. Why we generally declare constructor as public member.
3. Why there is no destructor in java.


3.Differentiate between Constructor and Method of class.

4.What is constructor? Explain constructor overloading with example. 

5. Explain Static Variable, Constants and Methods with example.


6.Write a class named Rectangle to represent a rectangle. It contains following (7 Marks)
members:
Data: width (double) and height (double) that specify the width and height of the
rectangle.
Methods:
1. A no-arg constructor that creates a default rectangle.
2. A constructor that creates a rectangle with the specified width and height.
3. A method named getArea() that returns the area of this rectangle.
4. A method named getPerimeter() that returns the perimeter.

7.When will you declare a method as a static ? Explain Static method with suitable example.

8. Discuss Various access modifires with example.
(Explain different Visibility modifires.)
(Explain keyword Private ,Public and Protected.)

9.Differentiate between protected and default access specifiers.

10.Write a program that reads file name from user,through command line argument and displays/reads content of the text file on console.

11.Describe Inheritance and its types with suitable example. 

12.Write a program to check whether the name given from command line is file or not?
If it is a file then print the size of a file and if it is a directory then it should display
the name of all files in it.

UNIT-5

1.Discuss benefits of Object Oriented Approach ?

2. What is wrapper class? What is the use of wrapper class in Java?

3. What is wrapper class? What is Autoboxing?

4. Explain the keywords method : 1. Wrapper class
2. finalize ()
3. Recursion
4. Static 

5.Discuss Following keyword with example:
(1) Super Keyword
(2) Final Keyword
(3) New
(4)Finally

6.State Differentiate String class and StringBuffer class.

7.What do you understand by super keyword ? Write use of super keyword.

8.Explain method overloading with example.

9.Explain method overriding with example.

10.Differentiate method overloading & method overriding.

11.Differentiate between final, finally and finalize. What will happen if we make class and method as final ?

12.Describe Dynamic method dispatch with example.

13.What is package in JAVA ? Explain its advantges.

14.What is package.? What are the requirements of it ? What we can achieve using package.?

UNIT-6

1. Define exception. List java’s common exception. Write a JAVA program to generate and handle array index out of bounds exception.

2.What is Exception? Demonstrate how you can handle different type of exception separately.

3.Differentiate between Interface and abstract class. When interface is Preferred Over abstract class.

4.What do you mean by interface ?Differentiate between Interface and abstract class.

5.This Program is in book.(6-26 Page no.(6.10.2))

6.Differentiate between final, finally and finalize. What will happen if we make class and method as final ?

7.Explain the following terms with respect to exception handling. (1) throws
        (2) throw
        (3) finally

8. Explain interface in JAVA. How do interfaces supports Polymorphism ?

9.Consider following code fragment:
try {
statement1;

statement2;
statement3;
}
catch (Exception1 ex1) {
}
finally {
statement4;
}
statement5;

1. Which Statements will execute if no exception is occurs.
2. Which Statements will execute if Exception 1 is occurs at statement 


10.Write an abstract class named Person and its two subclasses named Student
and Employee.
A person has a name, address, phone number, and email address. A student
has enrollment, course. An employee has an office, salary, and designation.
Define constructors and methods for input and display for both classes.
Write a main program to give demonstration of all.

11.Explain use of finally in exception handling.

12.Discuss exception and error.

13.Explain interface, its types and its usage.

12.Explain abstract classes with example.

13.Differentiate the followings:
1. Checked and Unchecked Exceptions
2. Socket and ServerSocket
3. Text I/O and Binary I/O
4. String and StringBuffer 


UNIT-7

1. What are the layouts in JAVAFX ? List different types of layout and explain anyone layout with example.

2.Explain inner class with example.

3. Explain Event handling in java and describe how mouse event and key pressed events are handled.

UNIT-8

1. Write a program that contains three buttons OK,CANCEL and HELP and onetextfield. if OK is
pressed shown on the status bar-“OK is pressed” and the textfield should turn red. When
CANCEL is pressed -shown on the status bar-“CANCEL is pressed “and text field should turn
green. When HELP is pressedshownon the status bar-“HELP is pressed” and the text field should
turn yellow.

UNIT-9

1.Write a program using BufferedInputStream, FileInputStream,
BufferedOutputStream, FileOutputStream to copy content of one file Test1.txt into
another file Test2.txt.( 9-26 Page no.(9.6.7))

2.Differentiate: Text I/O v/s Binary I/O.

UNIT-10
1. What is collection in JAVA? Differentiate between Vector and ArrayList.

UNIT-11
1. Compare List and Set interfaces. Also compare ArrayList andTreeSet classes in java.

UNIT-12

1.Write a program to create two thread one display alphabet from a to z and other will display numbers from 1 to 100. 


2.What is Multithreading ? What are the ways which you can create a thread ? Explain with example.

3.Draw and Explain Thread Life Cycle.

click here for OOP-J Study Material


Java Programming Language - GeeksforGeeks

Comments

Post a Comment

Popular posts from this blog

SE ( 3161605) Book-Study Material

PE&M (3140709) IMP