Professional Documents
Culture Documents
1. (a) Elaborate the different kinds of bitwise and Boolean logical operators in Java.
[8]
(b) Write a Java program that will define a class Circle with necessary data members (center and
radius) and a method to find the area of the circle and find the area for two different circles. [8]
2. (a) Can constructors in Java be overloaded? If so, illustrate with an example. [8]
(b) Discuss the JDK and its components in brief. [8]
3. (a) Write a Java Program to show the use of Abstract classes. [5]
(b) Explain constructor over loading with an example. [5]
(c) List out the characteristics of interface. [6]
4. (a) What is an AWT? What is component object in the java AWT. [8]
(b) Distinguish between component and container in java AWT. [8]
6. Write an applet program to demonstrate the drawing of line, circle, oval rectangle and 3D rectangle.
[16]
7. Describe the complete life cycle of a thread with neat block diagram at each stage?
[16]
(a) Serializable
(b) Externalizable
(c) DataOutput
(d) ObjectOutput
?????
Code No: R5411002 2
IV B.Tech I Semester(R05) Regular/Supplementary Examinations, December 2009
OOPS THROUGH JAVA
(Electronics and Instrumentation Engineering, Electronics and Control Engineering)
Time: 3 hours Max Marks: 80
Answer any FIVE Questions
All Questions carry equal marks
?????
1. (a) Define an array. In Java, how the arrays of different dimensions can be created and initialized?[8]
(b) Write about the usages of the keyword ‘final’ in Java. [8]
2. (a) What is meant by call by reference? How call by reference can be achieved in Java? [8]
(b) Discuss the String class in Java. [8]
3. (a) What is an interface? What is the major difference between an interface and class. [8]
(b) Describe the various forms of implementing interfaces. Give examples of java code for each case.
[8]
4. Write a program to create 4 x 4 grid and fills it in with the 15 buttons, each lable with its index.[16]
6. Explain the methods used in adding and removing controls such as labels. List with an example.[16]
7. (a) What is ‘Exception handling’ ? Why is it considered as a necessary feature in JAVA? [8]
(b) Write a program to catch Array Out Of Bounds exception when you enter more number of
arguments at the command prompt. [8]
8. Write a Java program to read a list of elements from a data file and store the list in the:
?????
Code No: R5411002 3
IV B.Tech I Semester(R05) Regular/Supplementary Examinations, December 2009
OOPS THROUGH JAVA
(Electronics and Instrumentation Engineering, Electronics and Control Engineering)
Time: 3 hours Max Marks: 80
Answer any FIVE Questions
All Questions carry equal marks
?????
1. (a) Write down the syntax and execution procedure of different kinds of if statements in Java. [8]
(b) Write a Java program to find the sum of all elements in the one dimensional array. (Define a
class representing array with necessary data members and a method to find the sum) [8]
4. (a) What is an AWT? What is component object in the java AWT. [8]
(b) Distinguish between component and container in java AWT. [8]
6. Explain the Color class and its different functions used in applet programming and also explain the
showstatus () method with an applet example. [16]
7. Why exception handling is considered one of the important features in O.O.P. Write your explanation
with suitable examples. [16]
(a) InputStream
(b) OutputStream
(c) Reader
(d) Writer
?????
Code No: R5411002 4
IV B.Tech I Semester(R05) Regular/Supplementary Examinations, December 2009
OOPS THROUGH JAVA
(Electronics and Instrumentation Engineering, Electronics and Control Engineering)
Time: 3 hours Max Marks: 80
Answer any FIVE Questions
All Questions carry equal marks
?????
2. (a) What is meant by overloading methods? What are the advantages of overloading concept? [8]
(b) Write a method find Area that can find the area of the circle/square/rectangle using overloading
concept. [8]
3. Write your own versions of the string methods for searching strings. [16]
4. Write a java program to print the fol1owing frame. The size increases when you move from left to
right [16]
A AAAAA
B BBB B B
7. (a) What are the methods by which we may stop threads? Give example situations. [8]
(b) What is the difference between suspending and stopping a thread? [8]
8. Write a Java program to read a set of sentences from a text file and check the following :
?????