1. (a) Compare the following :
(i) Transient and Volatile.
(ii) == and equals ()
(iii) Interface and Abstract class
(b) Write a program in Java that accepts a file as input and prints its contents to standard output in reverse order. That is, the last line of the file is printed as first line.
(c) Write a program in Java to add two complex numbers.
(d) What do you mean by a layout manager? Explain Grid Baglayout in detail with an example.
Answer. Layout managers are software components utilized in widget toolkits that have the cabability to lay out widgets by their relative positions Read More
2. (a) What is overloading? What is overriding? Explain the differences between them.
Answer. Overloading takes place when more than one method in the same class share the same name. Read More
(b) What is the function of this keyword in Java?
3. (a) Explain join () method with an example. To which class in Java does it belong to?
(b) Explain the function of finalize () in Java with an example.
4. (a) Write a program in Java that accepts 5 strings as input and prints those strings as output which consist of atleast one vowel.
(b) If Java, a platform independent language? Justify your answer.
5. (a) Explain the difference between AWT, and swing. Why do you prefer to use swing over AWT?
(b)Write a program in Java that accepts a string as input and checks whether it is a palindrome or not.

Recent Comments