java tutorial - Java Strings copyValueOf() method - java programming - learn java - java basics - java for beginners
Learn java - java tutorial - java strings copy value of - java examples - java programs
Description
Java Strings copyValueOf() method in Java has two different forms:
- public static String copyValueOf (char [] data) - it returns a string which represents a sequence of characters in the specified array.
- public static String copyValueOf (char [] data, int offset, int count) – it is a sequence of characters in a given array.
Syntax
The syntax of the method is:
Options
Detailed information about the parameters:
- data is an array of characters;
- offset is the beginning of the displacement of the subarray;
- count is the length of the subarray.
Return value
- In Java, copyValueOf () returns a string containing the characters of the character array.