What is return used for in java?



What is return used for in java?..

Answer / Vivek Chand

The 'return' keyword is used to exit a method and send a value back to the caller. If a method has a return type, it must return a value of that type.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Core Java Interview Questions

What is string builder in java?

1 Answers  


what is collatration?

1 Answers  


Can any one say how will sort map objects in java?

2 Answers   TCS,


How we get some middle records in one table?

2 Answers   3i Infotech,


Does java trim remove newline?

1 Answers  


What is array length?

1 Answers  


What are listeners in java and explain ?

2 Answers   TCS,


when,where and how to use abstract class and interface

2 Answers  


What is difference between hash mapping and hash table?

5 Answers   NDS, Wipro,


if arraylist size is increased from initial size what is the size of arraylist...suppose initial is 100 , if i add 101 element what is the size...

10 Answers  


Interface A { String test(); } Interface B { int test(); } Create a class AB which must implements both A & B interfaces.

17 Answers   Hewitt,


What is the difference between state-based unit testing and interaction-based unit testing?

1 Answers  


Categories