Java examples for Language Basics:Primitive Types
Convert String to primitive byte
public class Main { public static void main(String[] args) { String str = new String("10"); //from w w w . ja va 2 s . c om byte b = Byte.parseByte(str); System.out.println(b); } }