Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
46 views

Advance Java Question Bank

This document contains a list of 55 questions related to Java programming topics like threads, JDBC, JSP, servlets, etc. The questions range from writing code snippets to demonstrate concepts to writing full programs to perform database operations or display dynamic web pages. Many questions involve writing Java programs that accept user input, perform operations, and display output to the command prompt or web browser.

Uploaded by

Pratham Kanade
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
46 views

Advance Java Question Bank

This document contains a list of 55 questions related to Java programming topics like threads, JDBC, JSP, servlets, etc. The questions range from writing code snippets to demonstrate concepts to writing full programs to perform database operations or display dynamic web pages. Many questions involve writing Java programs that accept user input, perform operations, and display output to the command prompt or web browser.

Uploaded by

Pratham Kanade
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 16

Advance Java Question Bank

Course:- TYBBA-CA

2 Marks Questions
1. What is thread?
2. Explain the methods sleep() with suitable syntax
3. Explain statement of jdbc
4. Explain types of statement in jdbc
5. What is Driver? Explain with the suitable syntax
6. Explain the class DriverManager
7. Explain the method executeQuery() with syntax
8. Explain the method executeUpdate()with syntax
9. Explain the method next() with syntax
10. Explain runnable interface with syntax
11. Explain the method start of thread
12. Explain the declaration tag of JSP
13. Explain the doGet method of Servlet
14. Explain the doPost method of servlet
15. Explain Print Writer method with syntax
16. Explain the method setContentType() with
syntax
17. How to import packages in JSP . Discuss with
syntax
18. What is spring?
5 Marks Questions
1. Explain the life cycle of applet and also explain how to
implement the thread with applet? Give example
2. Explain Thread with class with suitable example
3. Explain the terms
i. Connection
ii. Statement
iii. Prepared Statement
iv. ResultSet
Write the syntax of each interface

4. What is the difference between statement and


prepared Statement? Explain with the any one
example
5. Explain the life cycle of servlet. Give example
6. What is the difference between normal java example
and JSP example
7. Explain the concept of Callable statement with
suitable example
8. Explain the concept of Socket and Server Socket with
suitable syntax. Give example
9. Explain the advantage of Spring
10. Explain the advantage of Hibernate
11. Explain the classes DataInputStream and
DataOutputStream with suitable example
12. Explain the concept of Java Networking. Give
Example
13. Write a java program to display “iccs” for 10
times on the command prompt after every two
seconds
14. Write a java program to accept the from start no
and end no from user and display all no from start to
end after every two second on cmd prompt
15. Write a java program to accept the from start no
and end no from user and display all even and odd
numbers after every two second on cmd prompt
16. Write a java program to accept the from start no
and end no from user and display all numbers from
end to start after every two second on cmd prompt
17. Write a java program to create an applet frame
that consists of one button and on click of that
button, display iccs on the command prompt for ten
times after two seconds
18. Write a java program to create an applet frame
that consists of three lables and three textfields and
two buttons display and reset. Accept start and end
no in first two fields and on click of display button,
display all even and odd numbers in third textfields
after two seconds
19. Write a java program to create an applet frame
that consists of one button and on click of that button
, display the background color of frame after every
one second.( Color like red, green)
20. Write a java program to create an applet frame
that consists of two buttons start and stop and on
click of the start button, blink both the buttons and on
click of stop button, stop blinking buttons.
21. Write a java program to create an applet frame
that consists of two buttons start and stop and on
click of the start button, toggle the names on the
button. ( Change button names )
22. Write a java program to create an applet frame
that consists of two buttons start and stop and on
click of the start button, demonstrate the traffic signal
23. Write a java program to create an applet frame
that consists of two buttons start and stop and on
click of the start button, move the text “iccs” from left
to right .
24. Write a java program to create an applet frame
that consists of two buttons start and stop and on
click of the start button, move the string “iccs” in four
directions

25. Write a java program to create an applet frame


that consists of two buttons start and stop and on
click of the start button, demonstrate CAR racing
26. Write a java program to create an applet frame
that consists of two buttons start and stop and on
click of the start button, demonstrate Bouncing Ball.
Change the color of ball on each bounce. ( Use
Random class)
27. Write a java jdbc program to display database on
the command prompt
28. Write a jdbc program accept the rollno from user
and display the record of that student on the
command prompt
29. Write a jdbc program accept the name from user
and display the record of that student on the
command prompt
30. Write a jdbc program accept the roll no and
name from user and insert that record inside the
database and display the record of that student on the
command prompt
31. Write a jdbc program accept the roll no from
user and delete that record from the database and
display the record of that student on the command
prompt
32. Write a jdbc program accept the name from user
and delete that record from the database and display
the record of that student on the command prompt
33. Write a java program to accept the roll no and
new name from user and update the new name
according to the name given and display the updated
record on the cmd prompt
34. Write a java program to create the awt frame
that consist of one button and on click of that button,
display the record using prepared statement
35. Write a java program to create awt frame that
accept the rollno in textfield and on click of the
display button, display the record of that student
only on the command promp. Use prepared
Statement

36. Write a java program to create awt frame that


accept the name in textfield and on click of the display
button, display the record of that student only on the
command prompt. Use prepared Statement

37. Write a java program to accept the rollno and


name in two textfields and on click of the insert
button , insert the record inside the database and on
click of the display button, display the updated record
on the command prompt. Use prepared Statement

38. Write a java program to accept the roll no from


user in textfield and on click of the delete button,
delete the record from the database and on click of
the display button, display the updated record on the
command prompt. Use prepared statement

39. Write a java program to accept the name from


user in one textfield and on click of the delete button,
delete the record of that student only from the
database and on click of the display button, display
the updated record on the command prompt. Use
prepared Statement. Use prepared statement
40. Write a java program to accept the rollno and
new name from user and on click of the update
button, update the new name according to the rollno
given and on click of the display button, display the
updated record on the command prompt

41. Write a java program to display the record of all


the students on click of the display button using
callable statement

42. Write a java program to accept the rollno and


name from user in two textfields and on click of the
insert button, Insert the record using callable
statement and on click of the display button, display
the updated record on the command prompt

43. Write a java program to accept the rollno from


user in textfield and using callable statement , delete
the record of that student from the database and on
click of the display button, display the updated
record on the cmd prompt

44. Write a java servlet program to accept the user


name and password from user and check the user
name and password match with each other or not.
Display the proper message on the web brower
45. Write a java servlet program to accept the single
number of any digit from user and on the server side,
display the reverse of that number

46. Write a java servlet program to accept the single


number of any digit from user and on the server side,
display that number in terms of words

47. Write a java servlet program to accept the single


number of any digit from user and on the server side,
display that number is palindrome or not

48. Write a java servlet program to accept the single


number of any digit from user and on the server side,
display that number is Armstrong or not

49. Write a java servlet program to accept the rollno


from user on client side and on click of the display
button, display the record of that student on the web
browser

50. Write a java servlet program to accept the name


from user on client side and on click of the display
button, display the record of that student on the web
browser

51. Write a java servlet program to accept the rollno


and name from user on client side and on click of the
insert button, Insert that record inside the database
and also display the updated record on the web
browser

52. Write a java servlet program to accept the rollno


from user on client side and on click of the delete
button, delete that record from the database and also
display the updated record on the web browser

53. Write a java servlet program to accept the name


from user on client side and on click of the delete
button, delete that record from the database and also
display the updated record on the web browser

54. Write a java servlet program to accept the rollno


and new name from user on client side and on click of
the update button, update the new name according to
the rollno given and also display the updated record
on the web browser

55. Write a java JSP program to accept the two


numbers from user and on client side and on server
side , display the maximum of that two numbers

56. Write a java JSP program to accept the three


numbers from user and on client side and on server
side , display the maximum of that three numbers
57. Write a java JSP program to accept the two
numbers from user and on client side and on server
side , display the minimum of that two numbers

58. Write a java JSP program to accept the three


numbers from user and on client side and on server
side , display the minimum of that three numbers

59. Write a java JSP program to accept the single


number of any digit from user and on the server side,
display the reverse of that number on the web
browser

60. Write a java program to accept the single


number of any digit from user and on the server side,
display that number in terms of words

61. Write a java JSP program to accept the single


number of any digit from user and on the server side,
check whether that number is palindrome or not

62. Write a java JSP program to accept the single


number of any digit from user and on the server side,
check whether that number is armstrong or not

63. Write a java JSP program to accept the two


strings from user and on the server side, check
whether that two strings are same or not
64. Write a java JSP program to accept ther rollno
from user via html page and on the server side,
display the record of that student on the web browser

65. Write a java JSP program to accept the name


from user viaa HTML page and on the server side,
display the record of that student on the web browser

66. Write a java program to accept the rollno and


name via html page and on the server side, insert that
record into the database and also display the updated
record on the web browser

67. Write a java JSP program to accept the rollno


from user via html page and on the server side, delete
the record of that student from the database and
display the updated record on the web browser

68. Write a java JSP program to accept the name via


html page and from the server side, delete the record
of that student from the database and also display the
updated record on the web browser

69. Write a java program to accept the rollno and


new name from user user via html page and on the
server side, update the new name according to the
rollno given and also display the updated records on
the web browser

70. Write a java networking program to send Hello


message to the server side

71. Write a java networking program to accept the


two numbers on the client side and on the server side,
display the addition of that two numbers

72. Write a java networking program to accept the


two numbers using reader class and on the server
side, display the maximum of that two numbers

73. Write a java networking program to demonstrate


chatting application

74. Write a java networking program to accept the


file name from user on the client side and on the
server side, display the content of that file

75. Write a java networking program to accept the


rollno on client side, and on server side, display
the record of that student. Use statement
Interface
76. Write a java networking program to accept the
name on the client side using reader class and on
the server side, display the record of that student

77. Write a java networking program to accept the


rollno and name on the client side and on the
server side, insert that record and also display
the updated record

78. Write a java networking program to accept the


rollno from user on the client side, and on the
server side, delete the record of that student and
also display the updated record on server

79. Write a java networking program to accept the


name on the client side ,and server side delete
the record of that student and also display the
updated record on the server side

80. Write a java networking program to accept the


rollno and new name from user using reader
class and on the server side, update the new
name according to the rollno given and also
display the updated record on the server

7 Marks Questions
1. Write a java program to display the following
options to the end user
i. Display all record from the database
ii. Display the record using rollno only
iii. Display the record using name only
iv. Insert the record rollno and name
Accept the choice from user using reader class
and display the record according to the choice
given.
2. Write a java program to display the following
options to the end user
i. Display all the record
ii. Delete the record as per rollno
iii. Delete the record as per name
iv. Insert the record
Accept the choice from user and using
statement interface, display the output
according to the choice given
3. Write a java program to display the following
options to the end user
i. Update the rollno according to the name
ii. Update the name according to the rollno
iii. Delete the record as per rollno
iv. Delete the record as per name
Accept the choice from user and display the
result as per the choice given. Use statement
Interface
4. Write a java program to display the following
options to the end user
v. Display all record from the database
vi. Display the record using rollno only
vii. Display the record using name only
viii. Insert the record rollno and name
Accept the choice from user using reader class
and display the record according to the choice
given. Use prepared Statement
5. Write a java program to display the following
options to the end user
v. Display all the record
vi. Delete the record as per rollno
vii. Delete the record as per name
viii. Insert the record
Accept the choice from user and using
statement interface, display the output
according to the choice given. Use Prepared
Statement
6. Write a java program to create the swing
frame that consists of the two textfields , two
lebels and three buttons called INSERT,
DISPLAY and RESET. Accept the roll no and
name from user in two textfields and on click
of the insert button, insert the record into the
database and on click of the display button,
display the updated record on the command
prompt and on click of reset button, reset all
the textfields . Use prepared statement

7. Write a java program to create the swing


frame that consists of two textfields, two lebels
and three buttons called update, display and
reset. Accept the rollno and new name from
user in two textfields and on click of the
UPDATE button, update the record inside the
database and on click of the display button,
display the updated record on the command
prompt and on click of the reset button, reset
all the textfields. Use callable statements

8. Write a java program to display the following


options to the end user
i. Update the name according to the rollno
ii. Update the rollno according to the name
iii. Delete the record using rollno
iv. Delete the record using name
Accept the choice from user and using callable
statement , display all the result according to
the choice given

You might also like