JNTU II B.Tech I Semester Supplimentary Examinations, November 2008
OOPS THROUGH JAVA
( Common to Mechanical Engineering, Mechatronics, Metallurgy &
Material Technology, Production Engineering and Automobile Engineering)
1. (a) List the eight data types used in Java. Give examples.
(b) Write a while loop to find the smallest n such that n2 is greater than 10,000.
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.
3. Create a 3-level inheritance hierarchy. Each class in the hierarchy should have a finalize( ) method, and it should properly call the base-class version of finalize( ). Demonstrate that your hierarchy works properly.
4. What is Multiple Inheritance? Explain how it cam be implemented in Java with
the help of an example.
5. (a) Explain how threads with different priorities execute in environment which supports priorities and which doesn’t support priorities.
(b) what are the functions available in java related to priority.
6. Give class hierarchy related to Panel and Frame. Briefly explain all the classes.
7. Explain various text components in JFC with examples.
8. What is URL? Explain components of URL. How will you establish URL connection? Explain with examples.