Method Overloading:-
Define the two or more method within the same class that share the same name, as long as their parameter declaration are different.
Method Overriding:-
when a method in a subclass has the same name and type signature as a method in its superclass then the method in the subclass is said to override the method in the superclass.
Monday, June 2, 2008
what is a transient variable?
A transient variable is a variable that may not be serialized. If you don't want some field to be serialized, you can mark that field transient or static.
what is Serialization?
Serialization is a mechanism by which you can save the state of an object by converting it to be a byte stream.
What is the difference between an Interface and an Abstract class?
An abstract class can have instance methods that implement a default behavior. An Interface can only declare constants and instance methods, but cannot implement default behavior and all methods are implicitly abstract. An interface has all public members and no implementation. An abstract class is a class which may have the usual flavors of class members (private, protected, etc.), but has some abstract methods.
Subscribe to:
Posts (Atom)