menu
techminis

A naukri.com initiative

google-web-stories
Home

>

Programming News

>

Day : 18 R...
source image

Dev

2w

read

234

img
dot

Image Credit: Dev

Day : 18 Return Data types and programmes

  • The return type must be specified before the method's signature when declaring the method.
  • There are several different data types that can be used as a method return type in Java, including primitive data types (e.g. int, double, char), object data types (e.g. Strings, Objects) and the void data type.
  • The void keyword in Java is used to specify that a method does not return any value. It is a return type that indicates the method performs an action but does not produce a result that can be used elsewhere in the code.
  • Java supports passing multiple arguments to a method, returning multiple values from a method, having multiple classes in a Java program, and having the same name in the same class.

Read Full Article

like

14 Likes

For uninterrupted reading, download the app