Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Download as pdf or txt
Download as pdf or txt
You are on page 1of 4

Unit-1

1. Write a short note on Java Virtual Machine(JVM) / List and explain the components of
Java Virtual Machine(JVM).
2. Write in detail about different types of operators in Java, Category-wise quoting their
functionality, operands and return type. Give one example statement for each.
3. What are primitive data types in Java? Briefly explain their size, range and other details.
4. Explain the terms: narrowing, widening , instantiation, autoboxing
5. Briefly explain: (i) Type annotations (ii) Lambda expression
6. List and explain the salient features of Java.
7. Write a note on: i) Autoboxing and unboxing ii) Java Development Kit(JDK).
8. Java is called as platform independent and strongly typed language. Justify your answer.
9. Write a Java code to i) check whether the string “madam” is starting and ending with a
same letter. ii) countall vowels in a string “welcome”. iii) replace ‘w’ with ‘W’ in a string
“welcome”. iv) append “Welcome” and “MADAM”
10. What do you mean by object reference variable in Java? Differentiate between object
and reference of a class.
11. Explain java architecture with its components.
12. What is Autoboxing and Unboxing? Explain with the help of program.
13. List various Operators in Java and explain relational operators.
14. Explain the meaning of following keywords which are associated with main method i)
public ii) Static iii) void iv) main() v) String args[]
15. Write a java program to interchange values of two integers accepted from user.
16. Explain the following i. Autoboxing ii. Conditional Operator.
17. Explain the following methods of String. i. Length() ii. Equals() iii. charAt() iv. compareTo
v. substring()
18. Define Identifier. Explain rules for identifiers in Java.
19. List and Explain any five features of Java.
20. How is main() method of Java written? Explain it in detail.

Unit-2
1. Write a short notes on access specifiers in java.
2. Explain the functionality of different types of iterative statements in java , using suitable
examples
3. Explain : (i) Varargs (ii) this
4. Demonstrate the behavior of static members in java using a suitable example.
5. Explain the semantics and functionality of the given statements :
a. Rectangle rec = new Rectangle(a,b);
b. break out;
c. public static void main(String ag[]) {.. }
6. Explain how memory is allocated to objects in Java?
7. Discuss in detail the working of ‘foreach’ loop in Java.
8. Explain the need of variable arguments with help of an example.
9. What is garbage collection in Java? How it is helpful?
10. When do we use keywords final and static? Explain the working of static member functions.
11. What do you mean by method overloading? Write a program to implement the concept of
constructor overloading.
12. Explain the working of switch..case with the help of example.
13. Write a short note on static methods in java.
14. Write a program to demonstrate the use of method overloading.
15. Explain the use of for loop with example.
16. Write a short note on Garbage Collection in Java.
17. Write a program to create a class “Rectangle” which defines two methods one to accept
dimension of rectangle(i.e.legth and breadth) and another to calculate and display the area
of rectangle.
18. When do we use switch-case statement? Explain it with example.
19. List and explain types of classes in Java.
20. What is a constructor? Explain characteristics of constructor.
21. What do you mean by variable arguments? Explain it with example.
22. When do we use ‘foreach’ loop? Explain it with example

Unit-3
1. Write a comparative note on abstract classes and interfaces in java.
2. Write a comparative note on overloading and overriding in java.
3. What is an inheritance? Explain multiple inheritance in java
4. Explain the terms/keywords : final , finally , finalize()
5. Explain the below given code and the concept(s) it represents :
a. Shape gen = new Shape();
b. Rect r = new Rect(); Circ c = new Circ();
c. int k = Integer.parseInt(args[0]) ; // reading a number from commandline
d. if (k==1) gen = r; else gen=c;
e. gen.showdata();

6. How do you create your own package and import it in a java program? Explain the procedure
step-wise using a suitable example.
7. Explain the below given code fragments :
a. interface values extends demoval { … }
b. class sample extends dsamp implements dval { .. }
8. Explain the use of keywords super and this. What are the facts based on which base class
constructors will be called while creating derived class objects?
9. What is an interface? How is an interface different from a class?
10. Explain the concept of method overriding with the help of an example.
11. What is the purpose of a package? Explain the steps to create user define packages in Java.
12. Write a program to implement the concept of multilevel inheritance.
13. Define an abstract class ‘Shape’ with an abstract method namely ‘CircleArea’ taking one
parameter that is its radius to compute area of a circle. Now create another class ‘Area’
containing a method ‘Circlearea’ for printing the area of circle. Create an object of class
‘Area’ and test class ‘Area’.
14. What are the facts based on which base class constructor will be called while creating
derived class objects?
15. Differentiate between class and interface.
16. What is a package? What are the benefits of creating package?
17. Explain with an example abstract class.
18. Explain the following keywords i) Extends ii) implements iii) finalize iv) final v) import
19. What is an interface? How can we implement interface in a class?
20. Explain the following with example. i. this ii. Super
21. Write a program to illustrate the concept of abstract method and abstract class
22. Write a program to implement multilevel inheritance with default constructor in each class.

Unit-4
1. What is a vector? List out any five vector methods and quote their functionality. Write one
example for each.
2. Write in detail about the life cycle of a thread in java.
3. Explain any 3 different cases of exception handling.
4. Explain the semantics and functionality of the given statements :
a. FileReader ins = new FileReader(inf);
b. dos.writeDouble(27.36);
5. Explain the difference between the following using a suitable example.
a. equals() , compareTo() , equalsIgnoreCase()
b. substring(k), substring(k,j)
c. indexOf(‘x’), indexOf(‘x’,n);

6. Explain :
a. int k = Integer.parseInt(num);
b. val = lval.longValue();
c. dval = Double.valueOf(s);
7. Why do we need to use vectors? Explain with the help of an example.
8. Can we handle multiple exceptions using a single catch block? Justify your answer with an
example.
9. Write a program to demonstrate the use of a class FileInputStream. Accept the input file
name at command line.
10. What do you mean by streams? Explain the concept of streams and types of streams
available in Java.
11. Write a program that creates two threads. Each thread is instantiated from the same class. It
executes a loop with 10 iterations. Each iteration displays “Welcome” message, sleeps for
200 milliseconds
12. Explain one dimensional array with example.
13. Explain exception handling mechanism in java.
14. Write a program to read and write contents of file using FileReader and FileWriter class.
15. What is vector? Explain any four methods of Vector.
16. Write a short note on Exception Handling in Java.
17. How is a Vector different from an array? How can you create a Vector in Java?
18. Explain the use of enumeration datatype in Java.
19. Define stream. Explain how we can write binary data to a file.
20. What are the different ways of creating a new Thread in Java?

Unit-5
1. Briefly explain: Delegation model, event, event listeners, and event sources.
2. What is an applet? Explain its life cycle in java.
3. What is a Layout manager? Explain any two layouts.
4. Write about : Button , Textfield , Label Controls.
5. Explain the semantics and functionality of the given statements :
a. public void paint(Graphics g ) { … }
b. b.addActionListener(this);
c. repaint()
6. Write about <APPLET> and <PARAM> tags.
7. What is the use of adapter class in Java? Explain any one of the adapter classes defined in
Java.
8. What is the role of layout manager? What is the default layout of frame? Explain its working.
9. How the concept of inner classes helps in Java to handle events? Explain with the help of
interface MouseListener
10. Develop a frame that has three radio buttons Red, Green, Blue. On Click of any one of them
background color of the frame should change accordingly.
11. Explain any two overloaded constructors and three methods of class Scrollbar.
12. Write a program to demonstrate the use of Canvas.
13. Explain any two overloaded constructors and three methods of class TextField.
14. What is the role of layout manager? What is the default layout of frame? Explain its working.
15. Explain the following listener interfaces i) KeyListener ii) MouseListener
16. Explain choice class along with its constructors in detail.
17. Create an AWT application to create a frame with a Button named “Cube”, a Label and a
TextField. Enter a number in the TextField. Click of the Button should display cube of that
number in the Label.
18. Create an applet to display “Java World”. Change the text color to red.
19. Create an AWT application to create a frame with a Button named “Square”, a Label and a
TextField. Enter a number in the TextField. Click of the Button should display square of that
number in the Label.
20. What is the use of LayoutManager? Explain GridLayout and BorderLayout.
21. Explain checkbox class along with its constructors in detail.
22. What is the use of adapter classes? Explain any one Adapter class in default.

You might also like