What is the purpose of the return statement?



What is the purpose of the return statement?..

Answer / Bimalesh Kumar Singh

The return statement is used in programming to exit a function or method and specify a value to be returned to the calling environment. This allows the caller to use the result as needed.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Core Java Interview Questions

What do bitwise operators do?

1 Answers  


What are the Class Libraries ?

1 Answers   Wipro,


Why hashmap is used in java?

1 Answers  


What is default specifier ??? Use of default specifier ???

4 Answers   Cognizant, Syntel,


What is the significance of continue jump statement? Explain with an example.

1 Answers   Amdocs,


How we can execute any code even before main method?

1 Answers  


What is the largest number a double can hold?

1 Answers  


What is tree node in java?

1 Answers  


Is there a sort function in java?

1 Answers  


What is the use of flag?

1 Answers  


What is ascii format?

1 Answers  


Explain notify() method of object class ?

1 Answers  


Categories