String Character Extraction getByte() method in Java?
Java String Handling
The String Character Extraction: getByte() method The getBytes() method is used in java that encodes a given String into a sequence of bytes and returns an array of bytes.
/* Syntax 1 */
public byte[] getBytes()
/* Syntax 2 */
public byte[] getBytes(Charset charset)
It is used to store the characters in an array of bytes and to convert the default character-to-byte by using this method.
Syntax:
byte[] getByte()