What will be the output when the following code segment is executed?String s = “1001”;int x = Integer. valueOf(s);double y = Double.valueOf(s);System.out.println(“x=”+x);System.out.println(“y=”+y);
Advertisements
प्रश्न
What will be the output when the following code segment is executed?
String s = “1001”;
int x = Integer. valueOf(s);
double y = Double.valueOf(s);
System.out.println(“x=”+x);
System.out.println(“y=”+y);
लघु उत्तर
Advertisements
उत्तर
The output is:
x = 1001
y = 1001.000000
shaalaa.com
या प्रश्नात किंवा उत्तरात काही त्रुटी आहे का?
