• Post Reply Bookmark Topic Watch Topic
  • New Topic

public class with default subclass?  RSS feed

 
Nicole Roesner
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can a public class have a subclass with no modifier (default)?
Thanks!!
 
Mellihoney Michael
Ranch Hand
Posts: 124
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
yes
but it doesn't make sense, don't you think so???
 
Bert Bates
author
Sheriff
Posts: 8945
17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Nicole -
Is your question:
public class Test { }
class Sub extends Test {}
??

This is legal and fine, what are you wondering about? What problem do you see ?
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!