Can i have abstract class with no abstract methods?
Answer Posted / punit
Yes we can, try this example:
abstract class absDemo
{
void hello()
{
System.out.println("Hello abstract");
}
}
class ab extends absDemo
{
void hello1()
{
System.out.println("hello hello1");
}
}
class absDemo1
{
public static void main(String args[])
{
ab a=new ab();
a.hello1();
a.hello();
}
}
Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
How do I get 64 bit java?
What is independent and dependent variables in research?
What is abstraction in java?
What are methods of a class?
What is a method type?
State some advantages of java?
What is static import in java?
Can static method access instance variables ?
What is == in java?
What is the advantage of functional interface in java 8?
What is the default value of byte datatype in java?
Explain method local inner classes ?
Does the order of public and static declaration matter in main method?
What is the difference between stored procedure & function?
What is concurrent hashmap and its features?