The static methods can be used without instanciating the class with an object.
Q2 . What is a static variable?
SOLUTION
A static variable provides a common variable with the same value for all objects of the class.
Q3 . Why do we use Public static void main(string [] args)?
SOLUTION
Well each of them have a reason
>the main function should be public to be accessed by all
>static because no variables are created first during the execution
> void because the main function does not return any values
>main is the name of the funtion
Q4 . what is constructor overloading?
SOLUTION
In constructor overloading we can call different constructor by creating an object with different parameters thereby invoking the constructor required.
Q5 . What is an interface?
SOLUTION
An interface is group of data members just like a class but it can only have static data members and abstract methods.
Q6 . What is an abstract class?
SOLUTION
It is class that cannot have any objects created or the class cannot be instanciated.
Q7 . what is a super keyword?
SOLUTION
Super keyword can be used in the child class to invoke the public and protecte data members of the parent class and also the constructors of the parent class.
Q8 . what is the word final?
SOLUTION
The final variable will always have the same value after its intialisation.
Q9 . Difference between final and finalize?
SOLUTION
Final is used to make a variable non volatile or simply not change its value whereas finalize is invoked before Garbage collection.
Q10 . what are inner classes?
SOLUTION
Inner classes are classes that are declared inside a class.