You are on page 1of 6

MCA-II Java Programming

QUESTATION BANK (Theory)


Core Java:
1. What is JVM ( CR Pg no -9,14m)
2. Explain data types available in Java. ( CR Pg no. 33,36m)
3. Explain with example the concept of Package. (Class-27)
4. What is Interface? Explain with example (Class 30)
5. Write the various access modifiers used in Java
6. Explain the use of super, this, final keywords. (Class 21)
7. Explain Wrapper classes. (Class 51)
AWT, APPLET, EVENT HANDLING:
1. Write advantages & disadvantages of Applet vs. Applications. (Class 59)
2. Explain life cycle of an applet.
3. Explain the components used in AWT, with proper methods & event they support.
4. Write different types of layouts available.
5. Explain Anonymous class with example.
6. Explain Delegation Event Model.
7. What are listeners? Explain functioning of any 3 listeners.
8. What is the primary difference between a Window & Panel?
9. What are the three approaches to handle events?
10. Explain <applet> tag.
11. Explain AWT class Hierarchy.
12. Explain Adapter class with example.
SWING:
1. Write the Model-View-Controller pattern.
2. Write the features of Swing.
3. Write the various Swing components available.
4. Explain different layouts available with swing.
5. Explain different Text input controls available.
6. Compare awt & swing.
MULTITHREADING:
1. What is threading? Explain Java Thread model.
2. Explain two types of Multitasking.
3. Explain Life Cycle of a Thread.
4. Explain states of Thread.
5. How the Threads can be created? Explain with example.
6. Explain isAlive() & join() methods.
7. Explain yield(), stop(), sleep() methods.
8. Write short note on
a. Multi Threading
b. Thread Priorities.
c. Synchronization
d. Main thread/Demon thread
9. How the multi threads can be synchronized?
10. How the interthread communication is possible?
(Using wait(), notify(), notifyall() methods.)
INPUT/OUTPUT USING STREAMS :
1. Explain java.io.File class. How File objects can be created?
2. Write the methods to handle file properties.
3. Why File class is platform independent?
4. What is stream in Java? Write the difference between byte & character streams.
5. Write methods available with InputStream & OutputStream classes.
6. Explain FileInputStream & FileOutputStream classes with exceptions.

7. Explain DatInputStream class with all available methods..


8. Explain list() method.
9. Explain RandomAccessFile class with the constructors & features.
10. Explain the concept of serialization & deserialization with example.
NETWORKING:
1. What is Computer networking? Explain TCP/IP, UDP protocols.
2. What is Socket? Explain the concept of Reserved Sockets.
3. Explain the classes available in java.net package.
4. What is URL? How java.net handles URL.
5. Explain URL class.
6. Explain Socket & ServerSocket with their constructors.
7. Explain DataGramPacket & DataGramSocket with constructors, methods.
8. Write short note on InetAddress class.
9. Write in how many ways the Object of InetAddress class can be created. (Explain
factory methods.)
10. Write the difference between TCP/IP & UDP.
JDBC PROGRAMMING:
1. Explain JDBC with its features.
2. Write the difference between JDBC & ODBC.
3. Explain different types of JDBC drivers.
4. Explain the interfaces available in JDBC.
5. Write the steps to make a connection & to access records form an access
database using JDBC connectivity.
6. Write the JDBC data types available.
7. Explain 3-tire architecture.
8. Write the types of PreparedStatement with examples.
9. Write short note on CallableStatement.

SERVLETS:
1. Explain life cycle of Servlet.
2. Explain the two types of servlet classes available. (GenericServlet
HttpServlet)
3. Write the difference between Applet & Servlet.
4. How to handle sessions in Servlets.
5. What are cookies? How to create them?
6. How to make a thread safe servlet.
7. Explain HttpServletRequest & HttpServletResponse.
RMI:
1. Explain RMI architecture.
2. Write the 4 steps required to use remote methods.
3. Explain Naming class.
JAVA BEANS & EJB:
1. Explain Life cycle of bean.
2. What are beans specifications?
3. Explain advantages of Java Beans.
4. What are the different properties and methods in java Beans?
5. MVC architecture.
6. Explain JAR files.
How the JAR files are created?
7. Write the Built in components available with BDK.
8. What is EJB? Explain the types of Enterprise Java Beans.

MCA-II Java Programming


QUESTATION BANK (Practical)
AWT, APPLET, EVENT HANDLING
1. Write an AWT program to add three scrollbars indicating red, green & blue color.
The background color of frame should change according to the value selected in
scrollbar.
2. Write an applet to welcome the user by his name. The users name should be
accepted by the HTML parameter.
3. Write java application that accepts text-formatting options in Combo boxes and
display text Happy New Year in center of frame according to the options selected.
4. Design an applet with 2 text fields & 2 buttons on it. Accept a number in a first text
field. If square button is pressed display the sq in 2 nd text box. If cube button is
pressed, display cube of a number.
5. Write an applet program that displays the current x,y co-ordinates in the status bar
when mouse moves.
6. WAP that displays TextField where user can type a file name, when a file name is
entered the program should check whether file exist. If it does not, an error
message should flashed on the screen else display contents of the file in
TextArea.
7. Write an AWT program, to display which key from the keyboard is pressed.
(Handle at least 3 special keys.)
8. Write an AWT program, to display red, green, yellow radio buttons on an applet .
when user selects any one , display message Welocme in that color.
MULTITHREADING
1.
Write java program to create and run following threads
a. To generate 10 terms of fibanocci series.
b. To print mathematical table up to 20.(table of 2 to 20)
c. Display message hello 15 times.
2. Using thread create a scrolling message. The text should scroll from left to right.
3. Using thread create a scrolling message. The text should scroll from right to left.
4. Write an applet with 2 numbers displayed with 2 different threads. As per the users
click increase the no. of one thread .
5. WAP that simulates a traffic signal light with short delay between states.
6. WAP to display a running clock on an Applet.
INPUT/OUTPUT USING STREAMS
1. WAP to accept a name from command line argument. Check whether the name
entered is a file or directory.
2. WAP to accept a file name, check whether it exists or not. If file exists display the file
properties.
3. WAP to accept a directory name from command line argument. Display the name of
sub-directories & file names with the last modified date of each.
4. WAP to display list of files having extension as .java in demo directory.
5. WAP to accept a directory name & file extension, display the file names having given
extension, display number of files
1.
6. Write 3 different programs to append the contents of one file to other using
RandomAccessFile class, ByteStream class. & CharacterCtream class. Handle proper
validations. Accept file names from command line argument.
7. WAP to find total number of occurrences of a particular string in file myfile.txt. Accept
the string from console. Use BufferedReader & FileReader classes.
8. WAP to swap the contents of two data files.
9. WAP which creates a random file containing rollno, name & marks. Accept name from
user and display corresponding rollno & marks.

10. Write a program to accept students details, create the object of student & store it in
stud.txt file. [ use ObjectStreams]
11. WAP to accept a file name, display the count for character e.
12. WAP to accept a file name, display alternate characters from a file.
13. WAP to count total number of characters, lines, tabs & words from data.txt file.
14. WAP to display how many times the word is occurs in a file.
15. WAP to accept some names from command line argument, store them in name.txt
file.
16.
WAP to accept three file names from command line argument. Copy the contents of first
2 files in a third file.
17. WAP to accept a file name from user, if file is not present create a file & store the
current date &time in a file.
18. WAP to copy contents of one file into another, by removing extra blank spaces &
comment marks.
9.
NETWORKING
1.
WAP to accept file name from client, check the file on server. If file is present
display contents to client otherwise display file not found error.
2.
Write client-server chat application program.
3.
a. Write a java socket program that runs on server at port 6000 and echos
back all strings sent by client. If client sends exit, the server prg. Should terminate.
b. Write a java socket prg. That runs on a client and send s series of strings to server
at port 6000. The server will return these strings as it is. If client enters exit prg.
should terminate
4.
Write a multi-threaded client server side chat application.
5.
Write a server side program to generate a random number & send it to client,
when client connects to server.
6.
Write a multithreaded server, based on socket, which can accept many clients
at a time. The client sends some text to server & server sends it back to client.
JDBC PROGRAMMING
1. Write JDBC backend class, which establishes a connection with the database
having a table STUDENT with structure rollno, name, class, dob.
a. Using the above backend class WAP to accept rollno from command line
and display the details with proper error messages.
b. Display all the records from table with proper formatting.
2. WAP that will open Department table of Oracle. Allow user to insert, modify,
delete record from table (take suitable structure).
3. Oracle db is stored on server..
a. Write a java prg. To create vendor table with vendorno, name, balccount
b. Write java prg. To insert rows in above-mentioned table. Accept user input.
4. Write a BackEnd java program which should do following functionalitya. Write a constructor to connect to a database.
b. Write following methodsReturn type
Method name
Argument type
Int
insertRow
String sql
Int
deleteRow
String sql
ResultSet
displayRecord
String sql, int no
ResultSetMetaData
displayTableColumns
ResultSet
Boolean
closeDataBase
no parameters
Boolean
createTable
String sql
5. Write a JDBC program to display field details of table emp.
6. Write a JDBC program to accept username & password. Check it in Login table, if
it is valid update login date & time fields.

7. Write a JDBC program to increase the salary of all employess by Rs. 2000/- for
those who are having salary less than Rs. 10000.
8. Write a JDBC program to display a sum of salaries department wise.

SERVLET
1. Write a servlet to design HTML page, with proper title, headings.
2. Write a servlet to check username & password passed from html page. If it
is Scott & tiger, display welcome message else show the same html
page again. [With res.sendRedirect (http://localhost:8080/login.html)]
3. WAP to accept two numbers from html display addition of them.
4. Write a Servlet to display html forms control names & their values.
5. Write Servlet to create html page for the feedback of product. Store the
feedback in a database.
6. Write a servlet to maintain a shopping cart, using session variables.
7. Write a servlet to add a Cookie to clients machine that stores username,
current date & time. Display the same.
8. Write a servlet to accept a name of background color from user, change the
background color as per the color entered. [Design HTML using servlet].
9. Design HTML page for e-mail registration, which will call servlet program,
that will accept all details from html page & will store it in a table. Assume
suitable table structure.
10. Write a servlet program to accept book name from user, from HTML. If
book is present in a table, then display book details. Assume suitable table
structure.
11.Write a servlet program that will display all employee details, department
number wise.
RMI
1. Write a remote method hello() that will display hello message with current
time to the client, when client gets connected.
2. Write a remote method Armstrong (int) that will take one integer number
from client, return whether the number is Armstrong or not.
3. Write a remote method check (String, String) that will accept a loginname
& password from client. If it is scott & tiger will return valid login else
invalid login.
4. Write a remote method count(String) that will take one String from client,
returns the number of characters in a String.
5. Write a remote method palin(String) that will take one String from client,
& checks whether the string is Palindrome or note.

You might also like