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
Break statement can be used as labels in java?
What do you mean by order of precedence and associativity?
Write a program to find the whether a number is an Armstrong number or not?
Why do we need strings in java?
What a static class can contains?
Where is core java used?
What is integer parseint?
Explain the difference between extends thread vs implements runnable in java?
What is the difference in between cpp and java? Can u explain in detail?
What is the difference between double and float variables in java?
how its run?
Are primitives objects?
What is a stringbuffer?
Why pointers are not used in java?
Can a constructor be made final?