KickJava   Java API By Example, From Geeks To Geeks.

Java > Java SE, EE, ME > java > lang > Byte

java.lang
Class Byte

java.lang.Object
  extended by java.lang.Number
      extended by java.lang.Byte
All Implemented Interfaces:
Serializable, Comparable<Byte>
See Also:
Top Examples, Source Code

public Byte(byte value)
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


[32]Print Byte value
By pan_khandar { at } yahoo { dot } co { dot } uk on 2002/09/05 21:59:28  Rate
public class ByteCon  {  
   public static void main ( String args [  ]  )   {  
     byte by = 12; 
     Byte b = new Byte ( by ) ; 
     System.out.println ( b ) ; 
    }  
  } 


[1700]java.lang.byte
By silvia on 2006/01/19 13:28:32  Rate
quiero la funcion de java.lang.byte. 
 


public Byte(String s)
     throws NumberFormatException
See Also:
parseByte(java.lang.String, int)
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


[33]_
By pan_khandar { at } yahoo { dot } co { dot } uk on 2002/09/04 22:55:49  Rate
public class ByteCon  {  
   public static void main ( String args [  ]  )   {  
     String str = "13"; 
     Byte b = new Byte ( str ) ; 
     System.out.println ( b ) ; 
    }  
  } 


public byte byteValue()
See Also:
Number
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


[1861]ByteValue example
By geethahareesh { at } yahoo { dot } com on 2007/01/17 22:33:33  Rate
import java.io.*; 
  
  
 public class byte1  {  
  
  
   
        public static void main  (  String args  [    ]    )     {    
               
        Float x1 = new Float ( 3989.4388 ) ; 
        System.out.println ( x1.byteValue (  )  ) ; 
         
           
           
  
  
          }    
        }   
 


public int compareTo(Byte anotherByte)
See Also:
Comparable, compareTo
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


[1862]compareTo simple example of byte class
By geethahareesh { at } yahoo { dot } com on 2007/01/17 22:55:45  Rate
import java.io.*; 
  
  
 public class byte1  {  
  
  
   
        public static void main  (  String args  [    ]    )     {    
               
        Float x1 = new Float ( 5989.4388 ) ; 
        Float x11 = new Float ( 4989.4388 ) ; 
        Float x2 = new Float ( 4989.4388 ) ; 
        System.out.println ( x1.byteValue (  )  ) ; 
        System.out.println ( x11.byteValue (  )  ) ; 
        System.out.println ( x11.compareTo ( x1 )  ) ; 
        // returns  < 0 if x11  <  x1 
        System.out.println ( x1.compareTo ( x11 )  ) ; 
        // returns  >  0 if x1  >  x11   
        System.out.println ( x11.compareTo ( x2 )  ) ; 
          }    
        }   
 


public int compareTo(Object o)
See Also:
Comparable
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public static Byte decode(String nm)
                   throws NumberFormatException
See Also:
parseByte(java.lang.String, int)
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public double doubleValue()
See Also:
Number
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public boolean equals(Object obj)
See Also:
Hashtable, Object.hashCode()
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public float floatValue()
See Also:
Number
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public int hashCode()
See Also:
Hashtable, Object.equals(java.lang.Object)
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public int intValue()
See Also:
Number
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public long longValue()
See Also:
Number
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public static final byte MAX_VALUE
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public static final byte MIN_VALUE
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public static byte parseByte(String s)
                      throws NumberFormatException
See Also:
parseByte(java.lang.String, int)
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


[1981]
By Tata - Qulme { at } yahoo { dot } com on 2008/09/20 21:00:22  Rate
public class Byte_ParseByte  {  
   public static void main ( String [  ]  args )   {  
     byte a = Byte.parseByte ( "70", 8 ) ; 
     // Process : 
     // = 70 * 8 =  ( 7 * 8 )  +  (  0  )  = 56 
  
  
     byte b = Byte.parseByte ( "71", 8 ) ; 
     // Process : 
     // = 71 * 8 =  ( 7 * 8 )  +  (  1  )  = 57 
      
     System.out.println ( "a = " + a ) ; // - >  56 
     System.out.println ( "b = " + b ) ; // - >  57 
      
    }  
  }  
 


public static byte parseByte(String s,
                             int radix)
                      throws NumberFormatException
See Also:
Character.MAX_RADIX, Character.MIN_RADIX, Character.digit(char, int)
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


[1985]radix explained
By Adithya u on 2008/11/04 23:14:56  Rate
class OWrapper 
  {  
   public static void main ( String args [  ]  )   
    {  
     //Declaration 
     String s="12; 
                 System.out.println ( Byte.parseByte ( s, 5 )  ) ; 
                 /*radix=base of positional number system 
                   Eg.: 444 
                   Base 10:  
                   4 x 10^2 + 4 x 10^1 + 4 x 10^0=444 
                   Base 7: 
                   4 x 7^2 + 4 x 7^1 + 4 x 7^0 = 228 
                   Character.MIN_RADIX=2 
                   Character.MAX_RADIX=36 
                   */
 
         }  
  }   
  
  
 


public short shortValue()
See Also:
Number
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public static final int SIZE
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public String toString()
See Also:
Object, toString(byte)
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public static String toString(byte b)
See Also:
Integer.toString(int)
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public static final Class<Byte> TYPE
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public static Byte valueOf(byte b)
See Also:
Byte(byte)
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public static Byte valueOf(String s)
                    throws NumberFormatException
See Also:
parseByte(java.lang.String)
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public static Byte valueOf(String s,
                           int radix)
                    throws NumberFormatException
See Also:
parseByte(java.lang.String, int)
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  

Popular Tags