Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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

What are dot operator queries?

1103


What is a container in a gui?

984


What is communist flag?

1013


Explain with example the concept of constant variable in java.

1176


How does singleton class work?

988


What is a stringbuilder?

912


Can an arraylist be empty?

1052


What is the main method java?

1028


Is string serializable in java?

1017


What is final method?

1066


How we can skip finally block of exception even if some exception occurs in the exception block in java?

946


Can a class be private in java?

993


Difference between nested and inner classes ?

1129


What is difference between calling start() and run() method of thread?

1129


What is a lambda expression ? What's its use ?

1103