Convert string to byte array java android

In this post we'll see a Java program to convert a String to byte array and byte array to String in Java.Converting String to byte[] in JavaString class has getBytes() method which can be used to convert String to byte array in Java.getBytes()- Encodes this String into a sequence of bytes using the platform's default charset, storing the result ... ................
................