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 / sitaram

yes,please find the below example.

abstract class AbstractClass1 {
public void method1(){
System.out.println("inside method1...");
}
}
class AbstractClass2 extends AbstractClass1{
public void method2(){
System.out.println("inside method2...");
}
}
public class AbstractDemo {
public static void main(String[] args) {
AbstractClass2 a = new AbstractClass2();
a.method1();
a.method2();
}
}

Is This Answer Correct ?    6 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the maximum size of hashmap in java?

942


What is the difference between the jdk 1.02 event model and the event-delegation model introduced with jdk 1.1?

1073


What is a default constructor and also define copy contrucyor?

1047


Why vector is used in java?

966


What is the default size of load factor in hashing based collection?

989


What is the use of beaninfo?

981


Name few "optional" classes introduced with java 8 ?

1069


Difference between string s= new string (); and string s = "abv";?

1160


What are the two ways in which thread can be created?

1003


Is there any case when finally will not be executed?

903


How do you reverse a string in java?

1059


How can you make a class serializable in java?

944


List some oops concepts in java?

983


When do you get classcastexception?

978


What are 5 boolean operators?

1102