Complete Question Bank Java
Complete Question Bank Java
B022414(022)
Question Bank
Unit 1
2 Marks
1. What do you mean by control flow? Write a java program to demonstrate the use of control flow used in
java.
2. Differentiate between method overloading and method overriding with example.
3. What are the data types in java and how to covert one data type to another.
4. Describe different bitwise operator and their uses with proper example.
8 Marks
Unit 2
2 Marks
1. Explain Inheritance in Java with suitable example and how does inheritance perform with final keyword?
Dec 2019
2. Explain differentiate between method overloading and overriding with suitable example and example
Dec 2019
3. What is error in programming? Explain exception handling and types in details. Dec 2019
8 Marks
2 Marks
1. Explain multi-threading in Java also explain thread control with suitable example. Dec 2019
2. Write a program in Java for producer-consumer problem using synchronization Dec 2019
3. Describe the Java I/O classes and Interfaces. Dec 2019, May
2019
4. Explain various Character Extraction methods with suitable example. May 2019
5. Explain the life cycle of thread. In how many ways can a thread be created in Java? Explain with example.
Dec 2018
7 Marks
Differentiate between string and string builder. Briefly explain string class methods. Dec 2018
6. Define Byte Stream and Character Stream. Write program to read the contents of file. Dec 2018
7. Write a Java program to count the number of alphabets, numeric values, words and special symbols in a line
of text entered from the user during runtime. Dec 2017
8. Explain the following in nutshell :
a. Garbage collection
b. Security promises of Java
9. Explain thread life cycle in details.
10. What are Wrapper classes? Explain it with examples.
11. Explain String class with its inbuilt functions.
12. What do you mean by Multithreading? Explain it with example.
13. Explain Thread concept. How can we create customize threads.
14. Explain how many ways we can create thread class object with eample.
15. Explain thread synchronization with example.
Show the use of InputStream and OutputStream classes.
16. Show the use of reader and writer classes for reading and writing the data from hard Disk.
Unit 4
2 Marks
1. Write a java code to see the port number, protocol name of given URL? Dec 2014
2. Define the use of getcodebase(), showdocument(), getdocumentbase() Dec 2015
3. What is an event? May 2016
4. Which type of JDBC driver is the fastest one? Dec 2017
5. Explain the life-cycle of an Applet. Give suitable example. Dec 2019
6. Describe URL format. May 2019
7. Write the difference between applet and application Dec 2014
8. Define AWT its class and its package. Dec 2015
9. What is AWT? May 2016
10. What is the difference between Swing and AWT components? Dec 2017
11. Define Applet. Explain how it is different from an application and its life cycle. Dec 2018
12. Explain Wrapper classes in brief with example. Dec 2018
13. What is AWT? Give suitable example. Dec 2019
14. Compare AWT and Swing. May 2019
7 Marks
15. Explain applet life cycle and how applet tag in html allows you to pass parameter to your applet with suitable
example? Dec 2014
16. Write a multiline chatting program of client and server side by using TCP socket. Dec 2014
17. Write short note on : Dec 2014
18. Delegation event model
19. Adapter classes
20. Explain the applet tag with all its attributes and also explain applet skeleton Dec 2015
21. Explain : Dec 2015
a. Jdbc driver manager
b. Wrl
c. Whois
22. Write a program using inet address class and show the utility of url and url connection classes. Dec 2015
23. Explain life cycle of an applet with suitable java program. May 2016
24. Explain delegation event model in detail with suitable java program. May 2016
25. Explain JDBC in the context of Type1, Type2, Type3 and type4 driver. May 2016
26. What are types of JDBC drivers? Dec 2017
27. Inspect the following code carefully and answer the question with justification: Dec 2017
28. Code runs or gives compilation time error.
29. If code runs, then what would be the size/length of application box made by the program
import java.awt.*;
import java.applet.*
public class myapplet extends Applet { Graphi g;
g.drawString(“A Simple Applet”, 20,20);
}
30. What are Sockets i Java? Explain using java program the use of TCP and UDP Sockets to send and receive
data. Dec 2017
31. Define Event. Explain Event Delegation Model in brief. Dec 2018
32. Define Sockets. Write a program to demonstrate a simple TCP client-server interaction. Dec 2018
33. Explain in brief steps for Java database Connectivity with a sample program. Dec 2018
Explain Event Delegation Model in Java with suitable example Dec 2019
34. What is JDBC? Explain the types of Drivers in JDBC. Dec
2019
35. Write a program to demonstrate the client-server chat program using TCP/IP socket programming.
Dec 2019
36. Explain init(), start(), stop(), destroy() and paint() methods of Applet class. How can you pass parameter to
Applet? May 2019
37. Explain the steps that are necessary to create an application using Socket and Server Socket that can be used
to communicate between two different computer systems through network. May 2019
38. Write a program in Java to create an application that manager, username and password. The new users
should be able to register and existing user should be able to login. The database should be maintained in
Oracle. Explain how the output is achieved. May 2019
39. Write a program that will provide graphical user interface to perform addition of two numbers? Dec 2014
40. Explain layout manager? Dec 2014
41. What is an object class and explain its different methods? Dec 2014
42. Explain delegation event model Dec 2015
43. Explain : Dec 2015
a. Japplets
b. Rmi
c. Layout managers
44. Explain Remote method innovation with a suitable program. May 2016
45. Write a program to handle a mouse event by extending AWT components. May 2016
46. Explain swing components and why these are considered as light weighted? May 2016
47. Explain the steps to create RMI-based client and server. Dec 2017
48. Explain in brief various types of Layouts in Java. Demonstrate using a Java program any four types of Layouts
and explain their effects on the components. Dec 2017
49. Compare Frame and {Panel. Demonstrate using a Java program how the handling of a Frame is different than
handling of a Panel. Dec 2017
50. Explain any five AWT control in brief with example. Dec 2018
51. Write a Java Program to handle all the mouse events. Dec 2018
52. Write short notes on Layout manager and Remote Method Invocation Dec 2018
53. What are the Layout managers in java? Explain with suitable example. Dec 2019
54. What is RMI? Explain with suitable RMI program in Java Dec 2019
55. Explain : Dec 2019
a. Garage collection in java 3½
b. Object cloning in java 3½
56. Write a GUI program in Java using AWT components where there are two buttons on a panel. Initially only
Button 1 is visible and Button 2 is visible. When Button 1 is clicked the Button 2 gets visible and Button 1 gets
invisible and vice versa. Explain how the output is achieved? May 2019
57. Explain the steps that are necessary to create an RMI application that can be used to communicate between
different computer systems. May 2019
58. Explain Panel, Frame, Canvas, Windows and Container. What is event handling? May 2019
Unit 5
2 Marks
1. Write the definition of HashSet and TreesSet
2. What are Hashtable classes?
3. What do you mean by JAR.
4. Write the syntax to make instance of generic class.
7 Marks