• Post Reply Bookmark Topic Watch Topic
  • New Topic

return statement ends method invocation  RSS feed

 
Ranch Hand
Posts: 327
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you have a void method called doSomething() that looks like this:


Is the fact that the println statement being "unreachable" a product of my IDE, or the JLS?

JLS says statements after a return statement are not executed.

 
author and iconoclast
Sheriff
Posts: 24217
38
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It's the JLS. Later on the same page: Unreachable statements.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!