0% found this document useful (0 votes)
167 views5 pages

Consolidated JavaQB Latest 29-05-15

This document contains 100 questions divided into 8 units related to Java programming. The questions cover a wide range of Java topics including OOP concepts, exceptions, threads, Swing, JDBC, servlets, JSP, EJB and more. Students are asked to explain concepts, write code snippets, discuss differences between topics, and solve problems related to Java.

Uploaded by

blah
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
167 views5 pages

Consolidated JavaQB Latest 29-05-15

This document contains 100 questions divided into 8 units related to Java programming. The questions cover a wide range of Java topics including OOP concepts, exceptions, threads, Swing, JDBC, servlets, JSP, EJB and more. Students are asked to explain concepts, write code snippets, discuss differences between topics, and solve problems related to Java.

Uploaded by

blah
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 5

Unit 1

1. List and explain the java buzzwords. (10 M)


2. Discuss the labeled break and continue statement. (05 M)
3. Explain the type casting in Java. (05 M)
4. Write a program to calculate the average among the elements {4,5,7,8}, using for each in
java.
5. How for each is different from for loop. (10 M)
6. Discuss the 3 OOP principles. (10 M)
7. List down the various operators available in java language (07 M)
8. What is polymorphism? Explain with an example. (07 M)
9. How arrays are defined and used in java? (06 M)
10. How compile once and run anywhere? Is implemented in java language? (05 M)
11. Discuss the Lexical Issues in Java (08 M)
12. List and explain all the Primitive data types and how to initialize Literals. (07 M)
13. How the arrays are defined in java? Explain with an example. (05 Marks)
14. Differentiate the usage of access specifies in java and their scope. (05 Marks)
15. Write and demonstrate a Java program to initialize and display different types of integers and
floating point variables. (05 Marks)
16. Define type casting. Explain with an example. (05 Marks)
17. Explain
a. >>> b. short circuit logical operators c. foreach (06 Marks)
18. Describe the process of building and running Java program. (05 Marks)
Unit 2
19.
20.
21.
22.
23.
24.

Define exception. Explain the working of nested try blocks, with suitable examples. (10 M)
With examples give 2 uses of super. (10 M)
What is meant by instance variable hiding? How to overcome it? (05 M)
Explain the constructor method. How it differs from other member function. (05 M)
What is inner class? Write a program to demonstrate inner class. (10 M)
Write short notes on
a. Final
b. Abstract class (10 M)
25. Discuss with example
i. Method Overloading
ii. Method Overriding (10 M)
26. What is an applet? Explain the different stages in the lifecycle of an applet. (10 M)
27. Write a java applet that sets the background color to cyan and foreground color to red and
outputs a string message A Simple Applet (05 M)
28. Explain the javas built in exception. (05 M)
29. class Example
{ public static void main(String s[])
{ int a;
for(a=0;a<3;a++)
{
int b=-1;
System.out.println( +b);

b=50;
System.out.println( +b);
}
}
}
What is the output of the above code? If you insert another int b outside the for loop, what is the
output? (05 M)
30. Write a short notes on modifiers
a. Static b. Final
c. finally d. dynamic method dispatch
(10M)
31. Explain the adapter classes, with examples. (05 M)
32. Write a Java program to perform the addition of two complex numbers by using the methods
add() by passing object as a parameter and display result using method display(). Initialize
the real and imaginary values of the complex number using parameter constructor. (08
Marks)
33. Write the syntax of try and catch block to handle multiple exceptions, Explain (05 Marks)
34. Write an applet program to display the message VTU BELGAUM. Set the background
color cyan and foreground color to red. (10 Marks)
Unit 3
35. What is multithreading? What a program to create multiple threads in java. (10 M)
36. Discuss the significance of synchronization in java. (10 M)
37. A. Briefly explain the role of:
a. ActionEvent class b. AdjustmentEvent class. (04M)
38. Explain any two advantages of multithreaded programs. (04 M)
39. With syntax, explain use of isAlive() and join() methods. (04 M)
40. How synchronization can be achieved or threads in java? Explain with syntax. (08 M)
41. Explain the mechanism of event delegation model. Give an example for using keyboard
event. (10 M)
42. Enlist the different methods in WindowListener. What is the use of WindowAdaptor? (05 M)
43. What is meant by thread priority ?how is it assigned? (06 M)
44. What are threads? Provide any two typical applications where multithreaded programming is
used. (05 M)
45. Define the delegation event model. Briefly explain the role of:
a. a. Event Listener Interfaces b. Source of events
c. Adapter classes. (06 M)
46. What is synchronization? What is role of synchronization in threads? Demonstrate a program
using synchronized methods. (10M)
47. Explain any two event listener interfaces with its function or methods. (05 Marks)
48. Describe the significance of adapter classes with an example (10 Marks)
49. What is producer consumer problem? Explain the solution for producer consumer
problem with a program. (06 Marks)

Unit4
50. Briefly explain the contents and components in swings. (10 M)
51. Explain he JScrollpane and JComboBox with a program. (10M)
52. Explain the following with an example for each

a. JTextFiled class
b. JButton class
c. JComboBox class (12M)
53. How AWT is different from swings? What are the two key features of it? Explain (08 M)
54. List four types of buttons in swings with their use. Write a program to create four types of
buttons on JApplet. Use suitable evens to show actions on the buttons and use JLabel to
display the action invoked. (12 M)
55. Create swing applet that has two buttons named alpha and beta. When either of the buttons
pressed, it should display alpha was pressed and beta was pressed. Respectively. (08 M)
56. Develop an applet to create a label, a text filed and 4 check boxes with the caption red,
green, blue and yellow. (10M)
57. Name and explain different types of swing buttons. Give their syntax. (10 M)
58. Write the steps to create JTable. Write a program to create a table with the column headings
Fname, Lname, Age and insert at least five records in the table and display. (10 M)
59. Explain various components of swing package. (06 M)
60. Write a java swing applet, which accepts a text from a Jtext filed, and displays the same text
with selected font size and font color using JLabel. (06 M)
61. Write an swing applet program to demonstrate with two Jbuttons named India and Srilanka.
When either of buttons pressed, it should display respective label with its icon. Refer the
image icons India.gif and Srilanka.gif. Set the initial label is press the button. (10
Marks)
62. What is Swing? List the main Swing features. (04 Marks)
63. Create a swing application having two buttons named alpha and beta. When either of the
button is pressed it should display alpha pressed and beta pressed respectively. (06
Marks)
64. List the different types of swing buttons. Write a program to create four types of buttons on
Japplet. Use suitable events to show actions on the buttons and use JLabel to display the
action invoked. (10 Marks)
Unit 5
65.
66.
67.
68.
69.
70.

71.
72.
73.
74.
Unit 6

Explain the concept of JDBC and the types of drivers architecture. (10 M)
Describe the various steps of JDBC, with code snippets. (10 M)
What are transactions? Explain.(06M)
What is meant by scrollable resulset? Explain. (06 M)
With syntax, explain three types of getConnection method. (08 M)
Give the java syntax for he following
a. Connecting to a database using JDBC/ODBC bridge, which has url =
jdbc:odbc:SDB, username=scott and password=tiger
b. Running he query select emp-age from emp over that connected database.
c. Counting number of employess, with he condition emp-age>50 (10M)
Briefly explain the callable statement object. Write a program to call a stored procedure. (10
M)
What is transaction processing? Write a program o execute a database transaction. (10 M)
Write a program to execute a database transaction.(10 M)
Write a note on Database metadata object methods and ResultSet metadata object methods.
(10 Marks)

75.
76.
77.
78.
79.
80.
81.
82.

83.
84.
85.
86.
87.

Explain the lifecycle of a servlet.. (10 M)


List and explain core classes that are provided in javax.servlet package. (06 M)
Differentiate between servlet and jsp. (04 M)
Write a program using servlet which contains HTML page to accept username and display
greeting message as hello username, how are you? in he browser window. (10 M)
Write short notes on
a. Servlet interface b. generic servlet class (04 M)
Illustrate the use of session information in servlets. (06 M)
What is the role of tomcat for servlet development? Explain the steps involved in
configuring tomcat web server (07 M)
Write a java servlet which reads two parameters from the webpage, say value 1 and value 2,
which are of type integers, and finds the sum of two values, and return back the result as
webpage. (07 M)
List the differences between CGI and servlets. (06 M)
Write a short notes HTTP Requests and Responses
What is a cookie? List out the methods defined by a cookie. Write a program in HTML for
adding a cookie. (10 M)
Describe the simple html file to pass the parameter to servlet and display the parameter values
accepted by servlet. (10 Marks)
Explain the servlet life cycle with an example. (10 Marks)

Unit 7
88. What are the different types of JSP tags? Demonstrate with a simple JSP program. (10 M)
89. What is RMI? Describe the code snippet RMI a client side. (10 M)
90. Define JSP. Explain the two types of control statements used in JSP by taking suitable
examples. (10 M)
91. Write a JSP program to create and read a cookie called EMPID that has a value of
AN2356. (10 M)
92. Write a program using RMI concept such that a client and server program in which client
sends hello message to the server and the server replies for the client. (12 M)
93. What is a session? Write a program create a session and read the session attributes. (10 M)
Unit 8
94.
95.
96.
97.
98.

What are the different types of enterprise beans? Explain. (10M)


What is deployment descriptor? List the deployment descriptor for EJB1.1. (10 M)
Explain the functions of EJB transactions attributes. (08 M)
Briefly discuss the significance of session java bean. (04 M)
Write a shot note notes on
a. Session java beans b. entity java beans (08 M)
99. Mention the differences between jar file and deployment descriptors. (10 M)
100.
With an example, explain how referencing with an EJB is done. (10 M)
101.
Write Short notes on
a. Deployment Descriptors
b. JAR file
c. Message driven Bean (10 Marks)

You might also like