import com.almworks.sqlite4java.*;
import java.io.*;

public class KAHVE2 
{
public static void main(String arg[]) throws SQLiteException
{
SQLiteConnection db = new SQLiteConnection(new File("/temp"));
db.open(true);
db.exec("drop table if exists KAHVE");
db.exec("create table KAHVE(isim String,kot int,fiyat double,miktar int,toplam double)");
db.exec("insert into KAHVE values('Espresso',150,9.99,110,0);");
db.exec("insert into KAHVE values('Venezuella',173,12.99,57,0);");
db.exec("insert into KAHVE values('Brezilya',123,12.99,30,0);");
db.exec("insert into KAHVE values('Kolombia',111,15.99,20,0);");
db.exec("update KAHVE set toplam=fiyat*miktar;");
SQLiteStatement statement = db.prepare("select * from KAHVE");
String isim="";
Object value;
int j=0;
try {
      while (statement.step()) {
	    int n=statement.columnCount();
	    
	    for(int i=0;i<n;i++)
	    {j=statement.columnType(i);
	     isim=statement.getColumnName(i);
	     value=statement.columnValue(i); 
	     System.out.print(isim+" = " + value+" ");
	    }
	    System.out.println();
      }
    } finally {
      statement.dispose();
    }

}

} 