This week's giveaway is in the EJB and other Java EE Technologies forum. We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan on-line! See this thread for details.
take a look at this posting if you read and understand the basics here, it will help you with your question. But basically you can declare a class within an interface, since an interface is defined as 'static abstract', what this mean is that a classes declared within the interface will be treated as a top level nested class. here is a sample code to show how to declared a class bar inside an interface foo and then use it. just make sure you understand the difference between a class and an interface, and that you understand inner classes and nest classes, this will clear up the question for you.... read the previous posting and look at the java sun tutorial s it explains the diff between an interface and class
NOTE: class bar1 is declared with a defult access modifier class bar2 had a public access modifier class bar3 is an abstract class which is extended by class foobar3 notice how class scoping is used to extend class foobar3 [ May 15, 2003: Message edited by: Rajinder Yadav ]
When faced with an easy thing to do and a hard thing to do, always pick the right thing to do!<p><a href="http://yadav.shorturl.com" target="_blank" rel="nofollow">Rajinder Yadav</a>