SGBAU OOPs(Java) Question Bank
Unit I
- Enlist & explain important characteristics of OOP.
- Explain salient attributes of Java programming.
- WAP in Java to exchange the values of two variables without using
03 variable. - What is type conversion & casting? Explain using suitable
example. - Give the difference between procedure language and OOP.
- What are various operator in Java? Explain each with suitable
example. - What are keywords? Enlist & explain various keywords in Java.
- WAP to obtain maximum of 03 variables in Java
- WAP in java to obtain the sum of all even numbers (1 to 50)using
for loop. - Implement a java program to display last digit of a given number.
Unit II
- What is constructor? Explain default constructor using suitable example.
- WAP in Java to create a method called ‘max( )’ to obtain maximum of
two - numbers, use class object to call it & display the output.
- Give the difference between class variables & local variables.
- Write a java program to instantiate & initialize the object.
- Explain the significance of ‘this’ keyword in java.
- What is garbage collection? How it is performed in java?
Unit III
- What is Inheritance? Explain its various types.
- Define package using suitable example?
- WAP in Java to demonstrate multi-level inheritance.
- What is method overriding? Explain using suitable example
- What are Super & Final keywords? Explain their significance.
- Give the difference between abstract class & Interface?
Unit IV
- Explain following terms with suitable syntax & examples?
1) Exception 2) Try 3) Catch 4) Throw 5) Throws 6) Finally - Implement file write operation using FileWriter class object to write into
a file named “Data.txt”. - WAP in Java to demonstrate Arithmetic Exception Handling using trythrow- catch block.
- What are user defined Exceptions? Explain using suitable example.
- Write a java program which can Read into a file? Use scanner class object
to achieve the same
Unit V
- Explain the significance of Applet tag with its various parameters.
- Give the difference between paint() & repaint() methods.
- Give the difference between application program & applet.
- Give the difference between getDocumentBase() & getCodeBase()
methods. - Explain the applet life cycle using suitable diagram.
- Explain the Color & Font class methods in applet using suitable
examples.
Unit VI
- Explain the Event Delegation Model. What are the various steps
suggested by it for event handling? - What are various Key Events? Implement the KeyListener to handle
the same? - Enlist & Explain all the Mouse Events which are handled by
MouseListener & MouseMotionListener? - Give the significance of adapter class in Event Handling?
- Write a java applet program to create Button & handle all the related
events of it? - Write a java applet program to create a file menu having options as
new, save,open, print, close.