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 you create interface instance ?

Answer Posted / ramu

hey uday u r wrong
In your program you are not created obj for interface, you have given anonymous implementation for 'Test' interface and instantiated that anonymous class only but not the interface.
for conformation call getClass() on 't'.(t.getClass())

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is a war file?

1007


Can we use a default constructor of a class even if an explicit constructor is defined?

1051


What value is a variable of the string type automatically initialized?

1053


What are the 5 types of research methods?

1088


how to handle exceptions in ejb?

2262


What is class and object in java?

950


How many types of java are there?

931


Can we use catch statement for checked exceptions when there is no chance of raising exception in our code?

983


What does it mean that a class or member is final?

941


Which collection allows duplicate values in java?

923


If you are given the name of the function at run time how will you invoke the function?

1080


What method is used to specify a container's layout in java programming?

1050


Is it possible to compare various strings with the help of == operator? What are the risks involved?

1023


Define a package.

1014


What is busy spin, and why should you use it?

1024