File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Beginning Java and the fly likes class in the interface Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "class in the interface" Watch "class in the interface" New topic

class in the interface

amar nath jha
Ranch Hand

Joined: Mar 09, 2006
Posts: 42
what is the role of class declared inside an interface.
Is it final?
gaurav abbi
Ranch Hand

Joined: Jan 05, 2007
Posts: 108
even i'm curious about the purpose, but anyway i wrote this dummy code which worked fine, so they are not private, one thing i can say.

interface IQuest{
class MyQuest{
int iTest;
void myQuestMethod1(){

public class Quest implements IQuest{
public static void main(String[] args){
IQuest.MyQuest obj = new MyQuest();
obj.iTest = 10;

thanks,<br />gaurav abbi
I agree. Here's the link:
subject: class in the interface
It's not a secret anymore!