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 stack class in java?

1037


How can we achieve thread safety in java?

1151


What is the purpose of return statement?

1064


What if constructor is protected in java?

1122


Is a boolean variable?

1006


Can java list contain duplicates?

1013


Can we use static class instead of singleton?

1052


what is the difference between preemptive scheduling and time slicing? : Java thread

1034


Why convert an applet to an application?

1104


5 Coding best practices you learned in java?

1015


Write a factorial program using recursion in java?

1020


Can a class have multiple superclasses?

1166


Difference between default and protected access specifiers?

1124


What is the difference between array and array list in java?

1231


Difference between predicate, supplier and consumer ?

1060