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 we instantiate Interfaces?

Answer Posted / anil pusuluri

One can't instantiate an interface. One can get a reference
to an interface.

Let's say Class A implements interface iA then we can't
instantiate IA
like IA a = new IA() -- this gives compilation error.

but we can get the referance to interface as below

IA a = new A()

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What does singleton mean in java?

997


What is command line argument

1195


How can you make sure that your singleton class will always return single instance in multi-threaded environment?

1026


What do you mean by an object in java?

1129


Explain the concept of proper inheritance?

1067


Difference between comparator and comparable in java?

1093


Which method must be implemented by all threads?

1265


Describe 2 different ways to concatenate two strings.

1200


What happens if we override private method?

971


What is an example of a constant variable?

1086


Is assembly language a low level language?

952


Is arraylist dynamic in java?

990


What is a nested list?

965


What is main method?

1039


Is array size fixed in java?

975