Only 48 hours left in the trailboss' kickstarter!

New rewards and stretch goals. CLICK HERE!



  • Post Reply Bookmark Topic Watch Topic
  • New Topic

class in the interface  RSS feed

 
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;
}
}
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!