मराठी

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
  या प्रश्नात किंवा उत्तरात काही त्रुटी आहे का?
पाठ 6: Variables and Expressions - EXERCISE [पृष्ठ १३२]

APPEARS IN

धीरज मेहरोत्रा Computer Science [English] Class 12
पाठ 6 Variables and Expressions
EXERCISE | Q 43. | पृष्ठ १३२
Advertisements
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×