What is the output of the following program: double w = 12.5; w*= 2; System.out.println("w is" + w);
Advertisements
प्रश्न
What is the output of the following program:
double w = 12.5;
w*= 2;
System.out.println("w is" + w);अति संक्षिप्त उत्तर
Advertisements
उत्तर
The statement w *= 2; multiplies the value of w by 2.
w = 12.5 × 2
w = 25.0
Output:
w is25.0
shaalaa.com
या प्रश्नात किंवा उत्तरात काही त्रुटी आहे का?
