Tuesday, April 30, 2013
Monday, April 29, 2013
Tutorial 5: command line arugument
Tutorial 5: command line arugument
Code:
CommandLineInput.java
package tutorial;
public class CommandLineInput {
public static void main(String[] args) {
String strTemp1 = args[0];
String strTemp2 = args[1];
System.out.println(strTemp1 + "\n" + strTemp2);
}
}
public class CommandLineInput {
public static void main(String[] args) {
String strTemp1 = args[0];
String strTemp2 = args[1];
System.out.println(strTemp1 + "\n" + strTemp2);
}
}
Sunday, April 28, 2013
Tutorial 4: char, boolean data types
Tutorial 4: char, boolean data types
Code:
PrimitiveDataType.java
package tutorial;
public class PrimitiveDataType {
public static void main(String[] args) {
//UNICODE = 65535;
char chChar = 'A';
System.out.println("our char variable is holding the value:"+chChar);
boolean booFalse = true;
System.out.println("our varible of type boolean is:" + booFalse);
//int, float, double, long, char, boolean - primitive datatypes
}
}
public class PrimitiveDataType {
public static void main(String[] args) {
//UNICODE = 65535;
char chChar = 'A';
System.out.println("our char variable is holding the value:"+chChar);
boolean booFalse = true;
System.out.println("our varible of type boolean is:" + booFalse);
//int, float, double, long, char, boolean - primitive datatypes
}
}
Saturday, April 27, 2013
Tutorial 3: float, long and double data types
Tutorial 3: float, long and double data types
package tutorial;
public class Fractional {
public static void main(String[] args) {
//3.14 double
//3.24f float
float fNum = 3.24f;
double dNum = 1.09999999999;
long lNum = 222222222L;
System.out.println("Value of Float number is:" + fNum);
System.out.println("value of double variable is:" + dNum);
System.out.println("value of long varialbe is:" + lNum);
}
}
public class Fractional {
public static void main(String[] args) {
//3.14 double
//3.24f float
float fNum = 3.24f;
double dNum = 1.09999999999;
long lNum = 222222222L;
System.out.println("Value of Float number is:" + fNum);
System.out.println("value of double variable is:" + dNum);
System.out.println("value of long varialbe is:" + lNum);
}
}
Friday, April 26, 2013
Thursday, April 25, 2013
Subscribe to:
Posts (Atom)