Java examples for Language Basics:String
Convert String to byte Array
public class Main { public static void main(String args[]){ String str = "Hello World"; /*www .java 2s .co m*/ byte[] bytes = str.getBytes(); } }