Answer all the questions.
Question 1: Differentiate between following terms along with suitable examples
i) Applet and application
ii) Inheritance and interface
iii) Private and Protected
iv) This and Super
Question 2: Answer the following questions
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 example
iv) What happens if a Final Keyword is applied to each of the followings?
a) Class
b) Function
Question3) (i) Explain finally block in Java? Describe with the help of a appropriate example?
(ii) Show user defined exception with an example?
(iii) Explain Call by reference in Java? Describe with the example?
Question4) (i) Write a program in java which displays all the arguments passed at command line in reverse order.
(ii) Write 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?
Question5) (i) Write 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) Write the recursive function in Java to determine GCD of two integers entered at command line.
(iii) What is event delegation model in Java? Describe.