difference between return a; and return ; c in java
Answers
Answered by
1
- return is not a function, but a statement. It is syntactically similar to other simple control flow statements like break and continue that don't use parentheses either. There is no difference. return is not a function call, but is a language statement.
Answered by
1
Explanation:
function a() { return 1; }
function b() { return(1); }
I tested the above code in Chrome's console, and both returned 1.
function c() { return "1"; }
function d() { return("1"); }
I also tested the code above, and both of the functions returned "1".
Similar questions
Computer Science,
1 month ago
Math,
1 month ago
Math,
3 months ago
Science,
9 months ago
Social Sciences,
9 months ago