A Developer Gateway To IT World...

Techie Uncle Software Testing Core Java Java Spring C Programming Operating System HTML 5 Java 8 ES6 Project

getByte() method

String Character Extraction getByte() method in Java

String Character Extraction getByte() method in Java?

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()

LEARN TUTORIALS

.

.