Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

return statement usages

 
saloni jhanwar
Ranch Hand
Posts: 583
Firefox Browser Notepad Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi folk
So far i know that i can use return statement inside a method or inside a loop or inside if-else statement.Is something remaining where we use it ?
 
Gaurangkumar Khalasi
Ranch Hand
Posts: 187
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
saloni jhanwar wrote: i know that i can use return statement inside a method or inside a loop or inside if-else statement.Is something remaining where we use it ?


In Constructor, for example try out the following:
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic