+ 1
What is difference between void and return
Give example
3 odpowiedzi
+ 6
Review your basic lessons. This is fundamental understanding how methods work in any programming language.
https://www.sololearn.com/learn/Java/2153/
+ 6
Void is a data type whereas return is a statement which allows us to return a value from the function
+ 2
Void is a keyword and also consider as a datatype which return no value in program it on ly print the message while return is a keyword and a statement which specify the value that return by a function