Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

class in the interface

 
amar nath jha
Ranch Hand
Posts: 42
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
what is the role of class declared inside an interface.
Is it final?
 
gaurav abbi
Ranch Hand
Posts: 108
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,
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.myQuestMethod1();
obj.iTest = 10;
}
}
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic