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...

What is difference between abstract class & final class

Answer Posted / farhad

A final class CANNOT be extended or subclassed however it can be instantiated:
final class A{
}

class B{
A a = new A(); //<<< instantiating final class A
We cannot say:
class B extends A //!!! that's a NO NO.
On the other hand abstract class can be subclassed but CANNOT be instantiated.
abstract class A{
}
class B extends A{
}

Is This Answer Correct ?    9 Yes 6 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is module with example?

1017


Why does java not allow multiple public classes in a java file ?

4550


What are the advantages of user defined functions?

1007


How do you do a line break in java?

1026


What data type is true or false?

1047


Write a program in java to establish a connection between client and server?

973


How do you convert int to char in java?

1075


What is the difference between inner class and nested class?

1096


Explain about interrupt() method of thread class ?

1127


Why put method is idempotent?

919


Explain methods specific to list interface?

988


How to reverse string in java?

1209


What is a null check?

1015


In which order the iterator iterates over collection?

996


describe method overloading

1023