Java String getBytes() method

getBytes() method returns sequence of bytes.

Syntax:

Returns:

It returns sequence of bytes.

Java String getBytes() Example 1

Output:

Java String getBytes() Example 2

Output:

Java String getBytes() Example 3

Output:

Java String getBytes() Example 4

Output:

Leave a Comment