Question:
Which class is extended by all other classes?
Answer:
The Object class is extended by all other classes. Source: CoolInterview.com
the parent class or base class is extended by other classes. Source: CoolInterview.com
Answered by: yogita | Date: 1/31/2009
| Contact yogita
A Singleton is a class which at any given time has only one instance and it does not allow more instances to be created. Such classes do not have an accessible constructor, for example:
public class Singleton { // class is automatically instantiated when the // class is loaded private static Singleton instance = new Singleton()
// constructor is made inaccessible by declaring // it private private Singleton() { ... }
// Access to the single instance of the class is // provided by a static accessor method public static Singleton getInstance() { // returns a reference of the private instance return instance; }
// rest of the class implementation } Source: CoolInterview.com
Answered by: modi | Date: 2/2/2009
| Contact modi
Object class Source: CoolInterview.com
Answered by: modi | Date: 2/2/2009
| Contact modi
Object class is the class which is extended by all other class.it is under the Java.lang.There is no need to import it(Bydefaultit is imported).so it is not clear by observing a simple code whether object class is extended or not. Source: CoolInterview.com
Answered by: Chandni Jain | Date: 8/3/2009
| Contact Chandni Jain
Object class is inherited by all the subclasses.it is the super class of every class we create.It is imported by default. Source: CoolInterview.com
Answered by: vibha | Date: 6/6/2010
| Contact vibha
If you have the better answer, then send it to us. We will display your answer after the approval.
Rules to Post Answers in CoolInterview.com:-
- There should not be any Spelling Mistakes.
- There should not be any Gramatical Errors.
- Answers must not contain any bad words.
- Answers should not be the repeat of same answer, already approved.
- Answer should be complete in itself.
|