Skip to content

Instantly share code, notes, and snippets.

@hamoungh
hamoungh / test1
Created September 25, 2014 13:39
int i = 3;
int j = 10;
++i;
j -= i;
class question4
{
public static void main ( String[] args )
{
int unitCost = 8;
int items = 5;
System.out.println("total cost: " + (unitCost * items) );
}
}
short a=12 ;
int b=33 ;
float x = 2.3;
double y = 3.14;
class question4
{
public static void main ( String[] args )
{
int totalCost = 6;
int items = 12;
System.out.println("cost per item: " + totalCost/items );
}
}
public static void main()
{
int i = 3;
int l = i / 2;
int k = i % 2;
Systemu.out.print(l+" "+k);
}
public static void main()
{
int a;
a = 5 + 3 * 5;
System.out.print(a);
}
public static void main(String[] args)
{
int a = 21;
int c ;
c = a++;
System.out.print(c);
}
String strA;
String strB = new String("Cheese");
String strA;
String strB = new String("Cheese");
System.out.print( strB );
strA = new String(" Whizz");
System.out.println( strA );
String strA = new String("Roasted ");
String strB = new String("Acorns ");
strA = strB;