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


Please Help Members By Posting Answers For Below Questions

How do I get 64 bit java?

534


What is independent and dependent variables in research?

472


What is abstraction in java?

619


What are methods of a class?

544


What is a method type?

539






State some advantages of java?

718


What is static import in java?

534


Can static method access instance variables ?

604


What is == in java?

570


What is the advantage of functional interface in java 8?

527


What is the default value of byte datatype in java?

487


Explain method local inner classes ?

595


Does the order of public and static declaration matter in main method?

621


What is the difference between stored procedure & function?

552


What is concurrent hashmap and its features?

528