public static void main(String ag[]){
int a = 12;
double b = 122;
String s1 = a + "";
String s2 = b + "";
System.out.println("s1 and s2: "+s1+" "+s2);
String s = "12345";
try{
double d = (new Double(s)).doubleValue();
System.out.println("d: "+d);
}
catch(NumberFormatException e){
System.out.println("s is not a number");
}
}
}