Answer all the problems.
problem 1: Differentiate between following terms along with suitable exs
i) Applet and application
ii) Inheritance and interface
iii) Private and Protected
iv) This and Super
problem 2: Answer the following problems
i) What do you understand by the term Serialization? Also differentiate between Transient and Volatile keywords.
ii) Why Java is called platform independent? Is C++ also Platform independent? Justify your answer?
iii) When do we declare a member of class static? Describe with the help of a appropriate ex
iv) What happens if a Final Keyword is applied to each of the followings?
a) Class
b) Function
problem3) (i) describe finally block in Java? Describe with the help of a appropriate ex?
(ii) Show user defined exception with an ex?
(iii) describe Call by reference in Java? Describe with the ex?
problem4) (i) prepare a program in java which displays all the arguments passed at command line in reverse order.
(ii) prepare the program in java to print the following pattern
1
2 2
3 3 3
4 4 4 4
5 5 5 5 5
(iii) Describe Synchronized Block in Java? Why do we use it?
problem5) (i) prepare a program in java to copy a file to another file. Name of the files are entered at command line? Like Copy File1, File 2
(ii) prepare the recursive function in Java to determine GCD of two integers entered at command line.
(iii) What is event delegation model in Java? Describe.