| Author |
About Interfaces and Classes
|
Siddharth Bhargava
Ranch Hand
Joined: Feb 23, 2007
Posts: 227
|
|
|
I found out one interesting thing that we can have a class inside an interface and an interface inside a class. Please could anyone tell me the concept behind this. I am very confused. Please explain the concept with some practical example. Thanks a lot.
|
 |
manoj sam
Greenhorn
Joined: Apr 06, 2007
Posts: 4
|
|
Hi, You mean class defined in an interface, or class instances (variables) in an interface definition ? manoja.
|
 |
Siddharth Bhargava
Ranch Hand
Joined: Feb 23, 2007
Posts: 227
|
|
I mean class defined in an interface......for e.g. public interface A { public class classX{ } } OR public class X { public interface A { } }
|
 |
Ernest Friedman-Hill
author and iconoclast
Marshal
Joined: Jul 08, 2003
Posts: 24059
|
|
Hi, Welcome to JavaRanch! Please don't post the same question to more than one forum; see our explanation here. I've deleted the other copy of this thread.
|
[Jess in Action][AskingGoodQuestions]
|
 |
Campbell Ritchie
Sheriff
Joined: Oct 13, 2005
Posts: 32708
|
|
Find a copy of a book like Bruce Eckels' Thinking in Java (older editions legally available to download-try here), which has a chapter about inner classes in. But don't expect it to be easy to understand . . .
|
 |
 |
|
|
subject: About Interfaces and Classes
|
|
|