Answer all the problems.
1) Differentiate between the followings with exs
(i) Applet and application program
(ii) Thread and process
(iii) Final and finalize
(iv) Method Overloading and overriding a method
2) Answer the following problems.
(i) Why do we use interfaces in Java? Describe with exs.
(ii) What happens if an abstract modifier is applied to class? Describe.
(iii) When do we use PageInt ()? Describe with the ex.
(iv) How do you define package in Java? How do you prevent a class from being accessed from one package to another package? List some significant packages.
(v) What is the aim of text field? List and describe its construction and significant methods.
3) Define following terms and their purpose.
(i) Panel
(ii) Frame
(iii) Java is distributed
(iv) Java is robust
(v) Java is interpreted
4) prepare following Program, run and show its results.
(i) prepare a program which let the user enter text from text field and then append it to the text areas.
(ii) prepare the program in Java to find largest and smallest of n numbers stored in array, where n is a positive number.
(iii) prepare the recursive program in Java for the greatest common divisor (GCD). Given two positive integers, GCD is the largest integer which divides the both.
(iv) prepare the program which accepts name of the file as command line and displays its content.