answersLogoWhite

0


Best Answer

The compilation error occurred when a FUNCTION (a method that returns a thing, not the void-type) has at least one branch of codes does not return the required object in the correct type.

It maybe confusing with some languages require to use the name of the Function as the "local" variable to be assigned with value, and hence establish the "return", while some languages, such as C# and Java, do not.

---- C# ----

public int My_Int_Function() {

// DO NOT Use the commented statement

// My_Int_Function = 1;

// Instead, use a local variable that is NOT the same as the method name

return 1; // never use the function name as the variable

}

User Avatar

Wiki User

12y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: What does missing return statement mean?
Write your answer...
Submit
Still have questions?
magnify glass
imp