JAVA Qy
JAVA Qy
QUESTION BANK
6 Marks
1. Describe the use of any methods of vector class with their syntax.
2. Explain the command line arguments with suitable example.
3. Write a program to print the sum, difference and product of two complex numbers by
creating a class named “Complex” with separate methods for each operation whose real
and imaginary parts are entered by user.
4. What is constructor? List types of constructors. Explain parameterized constructor with
suitable example.
5. Explain vector with the help of example. Explain any 4 methods of vector class.
2 Marks
1. Define inheritance. List types of Inheritance with suitable Example.
2. List the Uses of keywords 1. final 2. this 3. super
3. List any four built in packages in java.
4. Describe concept of package and its syntax.
5. Define syntax of abstract class and method.
4 Marks
1. Write the three uses of final keyword with suitable example
2. What is Interface? Describe syntax, feature & need of an interface
3. Write a single program to implement inheritance and polymorphism in java.
4. Develop a program to find area of rectangle and circle using interfaces.
5. Explain how to create a package and import it with suitable example.
6. Differentiate between method overloading and method overriding.
7. Describe concept of multiple inheritances? Write a java program to implement multiple
inheritance
8. Develop a program to implement the multilevel inheritance.
9. Explain method overriding with suitable example.
6 Marks
1. Develop an Interest Interface which contains simple interest and compound interest
methods and static final field of rate25%. Write a class to implement those methods.
2. Write a program to implement following inheritance.
Class: Employee
name,Downloaded
age from Campusify
display()
Unit 3- Exception Handling and Multithreading (12 marks)
2 Marks
1. Define concept of Exception?
2. Enlist any four-compile time error.
3. Define thread. Mention two ways to create thread.
4. Write steps to create a thread using Runnable interface.
5. Describe thread priority.
6. Describe use of throws with syntax and example.
7. Define the term: i. Thread ii. Exception
4 Marks
1. Explain the following clause in exception handling.
a. try b) catch c) throw d) finally
2. Describe the life cycle of thread with suitable example
3. Write a program to create user defined exception in java.
4. Write a java program in which Thread A will display the even number between 1 to
50 and thread B will display the odd numbers between 1 to 50. After 3rd iteration
thread A should go to sleep for 500ms.
5. Differentiate between throw and throws
6. Differentiate between Multithreading and Multitasking.
6 Marks
1. Develop a program to accept a password from the user and throw “Authentication
Failure”
2. Write a program to create two thread one to print odd number only and other to print
even numbers.
3. Define an Exception called “NotMatchException” that is thrown when a password is
not equal to “MSBTE”. Write the program.
UNIT 4 –Event handling using Abstract Window Toolkit (AWT) & Swings Components
4 Mark Question
1. Design an application to create from using Textfield, textarea,Button and Lable.
2. WAP to create three Button with Caption, OK, RESET and Cancel.
3. Explain feature of swing.
4. Write a program to demonstrate the use of keyEvent when key is pressed and display
“keypressed” message.
5. Write a program to display The Number on Button from 0 to 9 using FlowLayout.
6. Write a program to generate following output
11. Write a program to demonstrate the use of mouseDragged and mouseMoved method of
MouseMotionListener
12. Write a java program to create a table of name of Student ,Percentage and Grade of 5 Student using
JTable.
13. Develop an application using List components to add names of 10 different cities.
14. Design an application to demonstrate the use of Radio Button and Checkbox using swing
4 Marks
1. Write a program using URL class to retrieve the host, protocol, port and file of URL
http://www.msbte.org.in
2. Develop a program using InetAddress class to retrieve IP address of computer
when hostname is entered by the user.
3. Write the difference between SeverSocket and DatagramPacket
2 Marks
1. Name the Types of drivers for data base connectivity.
2. Write the use of Class .forName()
3. List Advantages JDBC over ODBC.
4. Write Advantages and disadvantages of Statements And Prepared Statement
5. List steps for database connectivity
6. Differentiate between Statement and Prepared Statement Interface
4 Marks
1. Write program to Create a student table in database and insert a record in student table
2. Write program to update record in database.
3. Write program to implement delete statement.
4. Develop JDBC program to Retrieve Data from table using resultset interface.
5 .Explain Types of ResultSet
6 Explain the methods of ResultSet Interface
7 Explain with neat diagram of JDBC architecture.
8 Explain Two tier Model of JDBC Architecture
9 Explain JDBC drivers.
Downloaded from Campusify