parseByte() Method with in java

Java Programming Language / Number Class in java

981

Program:

 
public class ParseByte {

   public static void main(String args[]) {

      byte x =Byte.parseByte("9");

      System.out.println(x);

   }
}

/*

This method is used to get the primitive data type of a certain String.
parseByte(String s) - This returns an byte (decimal only).
s - This is a string representation of decimal.

*/

Output:

9
Press any key to continue . . .

This Particular section is dedicated to Programs only. If you want learn more about Java Programming Language. Then you can visit below links to get more depth on this subject.