java tutorial - Java Strings valueOf() method - java programming - learn java - java basics - java for beginners
Description
The valueOf () method in Java has the following options, which depend on the parameters passed. This method returns a string representation of the passed argument.
- valueOf (boolean b) - returns a string representation of the logical argument.
- valueOf (char c) - returns a string representation of a char argument.
- valueOf (char [] data) - returns a string representation of a array char arguments.
- valueOf (char [] data, int offset, int count) - returns a string representation of a particular subarray array of char arguments.
- valueOf (double d) - returns a string representation double argument
- valueOf (float f) - returns a string representation of the float argument.
- valueOf (int i) - returns a string representation of an int argument.
- valueOf (long l) - returns a string representation of a long argument.
- valueOf (Object obj) - returns a string representation of a argument object.
Syntax
Syntax of this method:
Options
Detailed information about the parameters:
- see Description.
Return value:
- In Java, valueOf () returns a string representation of the passed argument.