Está en la página 1de 2

Reg. No.

Question Paper Code : 11383


B.E./B.Tech. DEGREE EXAMINATION, APRIL/MAY 2011 Fifth Semester

Information Technology

IT 2301 JAVA PROGRAMMING (Regulation 2008) Time : Three hours

Answer ALL questions PART A (10 2 = 20 marks) 1. Give the properties of abstract classes and methods and write a suitable example. Why does Java not support destructors and how does the finalize method help in garbage collection? Write a declaration to convert the value Programmer in the string variable convert to programming. Distinguish between static and dynamic binding. How does the declaration of a local inner class differ from the declaration of an anonymous inner class? Write a code to copy the contents of the file input.txt one byte at a time to output.txt using FileInputstream and FileOutputStream. When do the following events occur? (a) AdjustmentEvent (b) ItemEvent

2.

3.

4. 5.

6. 7.

8.

Write down the statements used to create a JFrame and a JButton and then add the JButton to the JFrame.

9.

List any two advantages of type parameters.

21

21

4 21
Maximum : 100 marks

10.

When would you use the CountDownLatch synchronizers and Exchange Synchronizers? PART B (5 16 = 80 marks)

11.

(a)

(ii)

Discuss the working and meaning of the static modifier with suitable examples. (8) Or

(b)

Explain in detail as to how inheritance and polymorphism are supported in Java with necessary examples. (i) (ii)

12.

(a)

Write a Java program to perform matrix multiplication using arrays. (8) Write a java program to search for a number in the given array using binary search. (8) Or

(b) 13. (a)

Give a detailed explanation of packages in Java. What is reflection and how does it help to manipulate java code? Or

14.

(a)

Write a program to create a calculator using swings with the four basic arithmetic operations : +, , *, /. Or

(b) 15. (a)

21

Draw the exception hierarchy in java and explain with examples throwing and catching exceptions and the common exceptions.

With suitable examples consider the number of restrictions to consider when working with java generics. Or

(b)

Write short notes on what threads are and the thread states and properties.

4
2

(b)

Consider a class person with attributes firstname and lastname. Write a java program to create and clone instances of the Person class.

21

4 21
11383

(i) Write a program to find whether a number is a palindrome or not. (8)

También podría gustarte