Java String getChars()


The java string getBytes() method copies the content of this string into specified char array. There are 4 arguments passed in getChars() method. The signature of getChars() method is given below:

Signature

The signature or syntax of string getChars() method is given below:

public void getChars(int srcBeginIndex, int srcEndIndex, char[] destination, int dstBeginIndex)



Returns

It doesn't return any value.


Throws

It throws StringIndexOutOfBoundsException if beginIndex is greater than endIndex.


Java String equals() method example

Flash soon



Copyright 2017 Design& Development