0
What is difference between output and return type
2 Answers
+ 3
Output is something printed on the device(usually is screen). Return type is what type a function returns.(int, double or more)
0
For example, say you have the following method:
public int myMethod() {
System.out.print("Hello") ;
return 7 ;
}
You are printing to the console the String "Hello", but are returning the integer value 7 (usually so you can use it later).
Hope this helps!