jQuery in Action, 2nd edition
The moose likes Game Development and the fly likes Creating an instance to an interface Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » Game Development
Reply Bookmark "Creating an instance to an interface" Watch "Creating an instance to an interface" New topic
Author

Creating an instance to an interface

SN Ayyappan
Greenhorn

Joined: Dec 24, 2007
Posts: 3
Hi,,, Can i able to create an instance to an interface. Please help me in this regard........
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 35237
    
    7
You can only create instances of classes, not of interfaces. You can create an instance of an anonymous class that implements an interface, though. Something like this:


Android appsImageJ pluginsJava web charts
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: Creating an instance to an interface
 
Similar Threads
Instantiate Interface?
small doubt in interface..
Design Patterns and EJB
How come interfaces can be instantiated?
Inner Classes in Interfaces?