This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes missing return statement Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » Beginning Java
Bookmark "missing return statement" Watch "missing return statement" New topic
Author

missing return statement

Tripti Ag
Ranch Hand

Joined: Jul 03, 2009
Posts: 37
Dear all,
Below is a very simple program in Java. When I compile this program, I get error message - "missing return statement". Please suggest me why I am getting this error?

[Added code tags - see UseCodeTags for details]




Stuart A. Burkett
Ranch Hand

Joined: May 30, 2012
Posts: 679
Java is case sensitive. You've declared your method to return a Void.
Tripti Ag
Ranch Hand

Joined: Jul 03, 2009
Posts: 37
Thank you very much.
 
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com
 
subject: missing return statement
 
jQuery in Action, 3rd edition