OOP
OOP
Explain all the characteristics of Java. Write a program to calculate the factorial of a number.
Write a java program to read a number and test whether it is Armstrong or not.
Differentiate between for loop and for each loop. Write a program to illustrate an array of objects.
Write a java program to read two matrices of m x n and p x q order, multiply them and display the
resultant matrix. ( Read values of m,n,p,q by using Scanner class)
Explain the following methods used in the StringBuffer class with examples.
1. append() 2. insert() 3. replace() 4. delete()
Why wrapper classes are required? Explain autoboxing and unboxing with suitable examples of
each.
Explain the following with an example:
i) this ii) super iii) final
What is the difference between Error and exception? Write a java program to illustrate the usage of
multiple catch handlers.
Explain the usage of Serialization in Java with an example.
Write a Java program to implement Polymorphism. (Note: Consider a scenario, Bank is a class that
provides method to get the rate of interest. But, rate of interest may differ according to banks. For
example, SBI, ICICI and AXIS banks are providing 8.4%, 7.3% and 9.7% rate of interest
What do you mean by deadlock? Explain with an example.
What is user defined Exception in Java? WAP to accept student age and check whether he is eligible
to vote or not? Show an appropriate message when the age is not eligible.
State the difference between Method overloading and method overriding with example.
Differentiate between class and interface with suitable example?