Java source code examples

Java source code samples. Java code examples.

Convert a octal String object to Byte.

0 votes Vote!!

The valueOf method of Byte class is used for converting a octal String to Byte object.

public class ByteWrapper {
	public static void main(String[] args) {
		String str = "7";
		Byte objByte = Byte.parseByte(str, 8);
		System.out.println(objByte);
	}
}
  • Share/Bookmark

Tags: java.lang

Discuss This Code