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 binary tree in java?

1062


What an i/o filter in java programming?

1103


What is the arraylist in java?

1058


How many types of flags are there?

1017


What is the different types of functions?

1059


How to sort elements in a parallel array in java?

899


What are the drawbacks for singleton class?

1026


Explain access modifiers in java.

1046


How does java pattern compile work?

969


How do you convert an int to a string in java?

1135


What is string english?

1019


What is the synchronized method modifier?

1205


Variables used in a switch statement can be used with which datatypes?

999


What is the output of the below java program?

1048


How do I compare two strings in word in java?

992