Online Java Compiler By
JavaTpoint.com
public class JavaByteParseByteExample1 { public static void main(String[] args) { String str="-8"; int val=Byte.parseByte(str); System.out.println(val); } }
Output