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 is autoboxing in java?
What is the use of conditional statement?
Difference between collection, collection and collections in java?
Explain about features of local inner class?
What are keywords give examples?
which pattern is default in scanner package?
What do you mean by exception handling in Java?
What is native code?
Does google use java?
What language is java written?
How do you format in java?
What is the static method?
What is boolean used for?
How do you access command-line arguments within the code?
Why is static used?