Example 3.1
Class datademo01{
public static void Main (string[] args) {
int num = 99999999999999999999999d
}
}
Example 3.2
Class datademo02{
public static void Main (string[] args) {
int max = Integer.max_value;
SYSTEM.OUT.PRINTLN ("Maximum value of integer:" + max);
System.out.println ("Integer maximum + 1:" + (max + 1));
System.out.println ("Integer maximum + 2:" + (max + 2));
}
}
Example 3.3
public class datademo03{
public static void Main (string[] args) {
int max = Integer.max_value;
SYSTEM.OUT.PRINTLN ("Maximum value of integer:" + max);
System.out.println ("Integer maximum + 1:" + (max + 1));
System.out.println ("Integer maximum + 2:" + (max + 2L));
System.out.println ("Integer maximum + 1:" + ((long) max +2));
}
}
Example 3.4
public class datademo04{
public static void Main (string[] args) {
Char ch1 = ' a ';
Char CH2 = 97;
System.out.println ("ch1 =" + ch1);
System.out.println ("CH2 =" + CH2);
}
}
Example 3.5
public class datademo05{
public static void Main (string[] args) {
char ch1 = ' \ ';
char CH2 = ' \ \ ';
System.out.println ("ch1 =" +ch1);
System.out.println ("ch1 =" +ch2);
System.out.println ("\" Hello world\ "");
}
}
Example 3.6
public class datademo06{
public static void Main (string[] args) {
float num = 3.0f;
System.out.println ("Two decimals multiplied:" +num*num);
}
}
Example 3.7
public class datademo07{
public static void Main (string[] args) {
Boolean flag = true;
SYSTEM.OUT.PRINTLN ("flag =" +flag);
}
}
3.1 Jobs