Can there be an abstract class with no abstract methods in it?
Answer / pankaj kumar
Yes,If A class have an abstract method the class must be declared as abstract, but if a class is declared as abstract
then,this is not mandatory that class hold any abstract method.
exa :
1. public Abstract class a{
// instance method;
}
///Above declaration is right
2. public class a{
// instance method;
// abstract method; //then you must declare this class as abstract.
}
///Above declaration is right
Is This Answer Correct ? | 13 Yes | 2 No |
class A{ some variables; public void a()throws Excepion1,Exception2{....} } class B extends A{ variables... public void a()throws E2,E3{.....} } Qns: here override of methods occurs or not,ore else wil give any compilation error or run properly..plz tell me briefly whts happening with the above codes....
Why is it called buffering?
How big is a pointer?
Which eclipse is best for java?
how can we synchronize Hash map?
What is an abstract class?
Why is java called java?
What are the advantages of assembly language?
Can inner class have constructor?
Which of these methods belong to Thread & Object class? join, yield, sleep, wait, notify
Why does java not allow multiple public classes in a java file ?
There are 2 different ways to create an object. a)By using keyword "new" b)By using Class.forName ("className").newInstance(); What is the difference between these 2 methods.