Problem 1
What is an object and class? Explain with an example.
Problem 2
What is the difference between class method (static) and instance method?
Problem 3
What is the difference between public member and private member of a class?
Problem 4
Is it legal for a static method to invoke a non-static method? Yes or No. If no, give reason.
Problem 5
Can an abstract method be declared fi nal or static?
Problem 6
When do we declare a method of a class static?
Problem 7
Describe the different level of access protection available in Java.
Problem 9
State true/false: (a) Abstract class cannot be instantiated. (b) A final method can be overridden. (c) Declaring a method synchronized guarantees that the deadlock cannot occur. (d) Volatile modifier is used to modify by synchronous threads.
Problem 10
What is the error in the following code snippet? class JPS_test { abstract void view(); }
Problem 11
Write short notes on the following (a) this (c) volatile. (b) transient