lundi 22 décembre 2014

What's the returning a value in Java?


public void warning(){ System.out.println("Watch out!"); }




public void warning(){ System.out.println("Watch out!"); return; }




We must use "return" statement with void methods. Bot of these bring same output. What's the difference?





Aucun commentaire:

Enregistrer un commentaire