KickJava   Java API By Example, From Geeks To Geeks.

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

java.lang
Class NumberFormatException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by java.lang.RuntimeException
              extended by java.lang.IllegalArgumentException
                  extended by java.lang.NumberFormatException
All Implemented Interfaces:
Serializable
See Also:
Top Examples, Source Code, Integer.toString()

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


[1118]double
By giridhar { dot } kakkireni { at } gmail { dot } com on 2005/07/31 15:12:34  Rate
double creditTotal1=Double.parseDouble ( getinput (  ) .getData (  ) .getOpenItems ( m ) .getNPRInvoice (  ) .getNPRInvoiceLine ( j ) .getAmount (  )  ) ; 
  
  
 System.out.println ( " credit total 1 is..before...."+creditTotal1 ) ; 
  
  
 creditTotal1=0.0-creditTotal1; 
  
  
 System.out.println ( " credit total after..is ..."+creditTotal1 ) ; 
  
  
  
 getinput (  ) .getData (  ) .getOpenItems ( m ) .getNPRInvoice (  ) .getNPRInvoiceLine ( j ) .setAmount ( Double.toString ( creditTotal1 )  ) 


public NumberFormatException(String s)
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


[1858]convert resultset Sting values to bytes for writing in to file
By sivasai { dot } d { at } gmail { dot } com on 2007/01/05 09:25:36  Rate
import java.util.*; 
 import java.io.*; 
 import java.sql.*; 
 class sqlwrite  
  {  
      
   public static void main ( String a [  ]  )  
  
  
    {  
        
       String out1,out2; 
       String s1="jdbc:odbc:siva"; 
      Connection con; 
      Statement st; 
       ResultSet rs; 
      try 
        {  
         Class.forName  ( "sun.jdbc.odbc.JdbcOdbcDriver" ) ; 
         con = DriverManager.getConnection ( s1,"scott","tiger" ) ; 
         st=con.createStatement (  ) ; 
        rs= st.executeQuery ( "select * from emp" ) ; 
          
         while ( rs.next (  )  )  
          {  
           /*out1=rs.getString ( 1 ) ;*/ 
           Byte b = new Byte  ( rs.getString ( 1 )  )  ; 
                   
          System.out.println ( b ) ; 
          
          
        
      /* FileOutputStream out =null; 
        
          out=new FileOutputStream ( "name.txt" ) ; 
          out.write ( s ) ; 
          out.close (  ) ;*/
 
         }   
         
        }  
       catch ( Exception e )  
        {  
       System.out.println ( e ) ; 
  
  
           }  
        
         
  
  
    }      
       
      
    
  } 

Popular Tags