Sunteți pe pagina 1din 1

Code No: RAR05320401 RA

III B.Tech II Semester Regular Examinations, Apr/May 2008


OOPS THROUGH JAVA
(Electronics & Communication Engineering)
Time: 3 hours Max Marks: 80
Answer any FIVE Questions
All Questions carry equal marks
?????

1. (a) Can you convert a for loop to a while loop? List the advantages of using for
loops
(b) Convert the following for loop statement to a while loop and to a do loop: for
(int i=0;i<=1000;i++) long sum=sum+i; . [8+8]

2. (a) What is an array? Why arrays are easier to use compared to a bunch of related
variables?
(b) Write a program for transposition of a matrix using arraycopy command.
[6+10]

3. Create a base class with two methods. In the first method, call the second method.Inherit
a class and override the second method. Create an object of the derived class, up-
cast it to the base type, and call the first method. Explain what happens. [16]

4. Prove that all the methods in an interface are automatically public. [16]

5. Explain in detail different Array related exceptions with the help of examples.[16]

6. What are the methods supported by KeyListener interface and MouseListener in-
terface. Explain each of them with examples. [8+8]

7. What is meant by AWT? How will you create User Interfaces for applets? [6+10]

8. (a) What are accessor methods?


(b) How will you create strings and stringbuffers? How will you modify them?
[8+8]

?????

1 of 1

S-ar putea să vă placă și