Java Prog Question Paper
Java Prog Question Paper
PART –A
1. a) How to use break and continue statements in java?
b) Illustrate the importance of this keyword in java.
c) Differentiate compile time errors and runtime errors in java.
d) What is assertion? Give example.
e) List the advantages and disadvantages of applet.
f) Differentiate GridLayout and GrodBagLayout.
PART –B
2. a) Write about the role of JVM, JAVA API in developing the platform independent java
program with suitable example.
b) What are the two control structures used in java for making decisions? Explain with
an example program.
3. a) Can we use constructors with parameters? What kind of parameters can be given?
Explain with area of various geometric shapes example.
b) With an example program explain the concept of classes and nested classes in java.
4. a) Write a program that shows an Employee class which contains various methods for
accessing employee’s personal information and methods for paying an employee.
b) Give the syntax of exception handling and also handle exception occurred during the
execution of divide by zero
5. a) Write a program to read and write disk file character by character using Reader and
Writer classes.
b) Explain thread synchronization with respect to multithreading. Why is it important?
7.
Explain different types Layout managers present in AWT with sample programs.
1 of 1
WWW.MANARESULTS.CO.IN
|''|'''||''||'''||||
Code No: R1622052 R16 SET - 2
3. a) Design a class that represents a bank account and construct the methods to
i) Assign initial values
ii) Deposit an amount
iii) Withdraw amount after checking balance
iv) Display the name and balance.
b) Do you need to use static keyword for the above bank account program? Explain.
4. a) Write a program which specify that there are two classes Rectangle and
Circle which implements the interface and find the area of rectangle and circle
b) Demonstrate nested try statements and finally statements.
6. a) Write a java code to create applet and customize it based on input parameters
b) Write different methods present in Window Listener interface.
4. a) Write inheritance hierarchy for the super class Quadrilateral, Parallelogram, Square and
Rectangle. Calculate area of square, rectangle and parallelogram.
b) Give the list of mostly used java API packages and also explain adding more classes to
a package.
6. a) Write an applet program that will take an input from the user to calculate the sum of two
integers.
b) Differentiate adopter classes and inner classes with examples.
|''|'''||''||'''||||
Code No: R1622052 R16 SET - 4
3. a) Discuss declaration, allocation and accessing array elements in java with matrix
multiplication example.
b) Write about command line arguments. Accept the input from keyboard to display
Fibonacci series.
5. a) What is thread scheduling? How to perform this by setting priorities to threads. explain
with an example program.
b) What are the states associated with threads? Write a java program for thread creation.
6. a) Explain various states in the life cycle of an applet. And also give the syntax of each
state.
b) What are the sources of events? How to handle the events in java through event
Listeners.