String to Bytes

Java-String to Bytes

String to Bytes The getBytes( ) method of String is used to encode the string into a sequence of bytes using the platform’s default charset(UTF-8) and store the result into a new byte array. For example: Another Forms of getBytes Method Other forms of getBytes() are also available. These are: These methods are used to encode … Read more…