JAVA PROGRAMMING LAST YEAR QUESTIONS
JAVA PROGRAMMING LAST YEAR QUESTIONS
SHORT QUESTIONS
LONG QUESTIONS
1. What is an exception? How is exception handled in JAVA. Difference between Throw and
Throws.
2. (a). Explain the concept of inheritance with its types.
3. What are packages in Java? How a user defined package is created in Java, explain with
example.
4. Define thread. How to create a thread in Java? Write a program that executes two threads.
One thread will print the even numbers and another thread will print odd numbers from 1 to
5.
5. Mention various AWT Controls Explain over four of them.
6. What are Servlets? What are the advantages of Servlets over CGI? Explain working of
service() method of a servlet with examples.
7. Write a method in Java that takes two integer arguments and returns power of it. Suppose X
and Y passing as an argument then it returns X to power Y offer calculation.
8. What is thread priority? Write are the default values? Write a program to define two threads.
One thread will print 1 to 10 no. Whereas other will print 10 to 1 nos.
9. What is JDBC? List out JDBC components and types of drivers. Write difference between Java
Applet program and Java application program.
10. What is package? What are the benefits of package? Explain Java API packages. List out any
five methods of string class by giving an example.
11.
A. What is exception? What are the methods of handling exception in Java.
B. What is difference between Application and Applet? Explain how will you write a simple
applet to display Hello world message.
12. What do you mean by Cascading Style Sheet(CSS)? What are the advantages of CSS? How
many ways are there to specify style information in a document?
13. What is Servlet? Explain life cycle of servlet. Give the supportive example also.
14.
A. Explain Applet life cycle. Write all method used to create an applet.
B. Explain Socket. How many types of Socket can be created in Java. Give an example also.
15.
A. What is Inheritance in Java? Explain all its type.
B. What is JSP? Explain all the main component of JSP and advantage of JSP.\
16. What do you understand by Layout Manager? Give all type of layout available in Java with
the help of example.
17. What is JSP? Explain the advantage of JSP and main component of JSP also. How JSP is
different from Servlet. Give an example also.
18. Explain the following:
a. Applet viewer
b. CSS
c. RMI
d. Super and Final
e. AWT
19.
a. Explain servlet life cycle.
b. Explain drives used in connectivity in Java.
20. Create a file to contain information about student performance on a module. Each student
has a name. Roll No.. subject marks and result.
Or
What is Inheritance in java? Explain its types. If we need to extend more than one class. How
it works? Give the example also.
21. What is inheritance in java? Explain its types. If we need to extend more than one class, how
it works? Give the code also.
22. What is JSP? Explain the advantages of JSP and main component also. How is it differ from
Servlet? Give an example to support your answer.
23.
a. Explain Applet life cycle. Write the all methods used to create applet with example.
b. Explain socket. How many types of socket can be created in Java? Give example also.
24.
A. Define Multithreading. Explain the way to create the thread with suitable example.
B. Explain Servlet life cycle.
25.
A. Explain exception handling in Java. What is the method of handling exception in Java?
B. What is AWT? Explain about the various AWT controls available in java with an example
also.