• Post Reply Bookmark Topic Watch Topic
  • New Topic

Interview question  RSS feed

 
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can a class be declared as
class A extends Applet and implements Servlet{
}
 
Ranch Hand
Posts: 319
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It very well can be declared, but what are you planning to do with it? BTW, the declaration needs to be abstract if you are not planning to implement the Servlet interface methods
 
Sudharsan Govindarajan
Ranch Hand
Posts: 319
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
oh! I missed the topic title. If those were the exact lines given in the interview, the answer is 'NO'.
But this is valid (will compile):

sudharsan
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!