Return keyword in java

Return keyword: return is a reserved keyword. It is used to exit from a method with or without a value. return statement must be last statement to get executed in a method. Return keyword in void method: void methods cannot return a value. return keyword not required for void type methods. But we can useContinue reading “Return keyword in java”

Design a site like this with WordPress.com
Get started