1. What is single inheritance?
Ans:one class is inherited by only other one class
2.What is multiple inheritance?.
Ans:One class inheriting more than one class at atime
3. Can java support multiple inheritance?
Ans:No
4. What is interface?.
Ans:Interface has only method declarations but no defn
5. What is differenec between abstract class and interface?.
Ans:In abstract class some methods may contain definition,but in interface every method should beabstract
6. How to u prove that abstrace class cannot instantiate directly?
Ans:As they dont have constructor they cant be instantiated
12.what is differenece between string and stringbuffer.
ans:Strings are immutable where as string buffer can be modified
Ans:one class is inherited by only other one class
2.What is multiple inheritance?.
Ans:One class inheriting more than one class at atime
3. Can java support multiple inheritance?
Ans:No
4. What is interface?.
Ans:Interface has only method declarations but no defn
5. What is differenec between abstract class and interface?.
Ans:In abstract class some methods may contain definition,but in interface every method should beabstract
6. How to u prove that abstrace class cannot instantiate directly?
Ans:As they dont have constructor they cant be instantiated
12.what is differenece between string and stringbuffer.
ans:Strings are immutable where as string buffer can be modified
Comments
Post a Comment