File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

void method returning nothing

 
Deepika Saxena
Ranch Hand
Posts: 59
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,
I read that void methods should not return any thing. But when i tried the following code, it is not giving any error.

could any body tells how the above code is compiling and running fine, though we are mentioned return statement.

Thanks.
--Deepika
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 33716
316
Eclipse IDE Java VI Editor
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Deepika,
"return" returns whatever is after the word return. Meaning "return 0;" returns an integer. "return;" returns what is after the word - nothing!
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic