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
What are dot operator queries?
What is a container in a gui?
What is communist flag?
Explain with example the concept of constant variable in java.
How does singleton class work?
What is a stringbuilder?
Can an arraylist be empty?
What is the main method java?
Is string serializable in java?
What is final method?
How we can skip finally block of exception even if some exception occurs in the exception block in java?
Can a class be private in java?
Difference between nested and inner classes ?
What is difference between calling start() and run() method of thread?
What is a lambda expression ? What's its use ?