I've been giving myself a crash course in Java using some lectures from Stanford, and I started working on my practice midterm yesterday.

So I'm reading my way through Sun's Java tutorial, and they don't define what the operator *= is, and that's the third question on my practice midterm. =P So just wondering, what does this operator mean / do? Thanks for the help.

Recommended Answers

All 4 Replies

After reading it, I realized how ridiculously difficult it is to see the operator. So it's a asterisk (multiplicative) and equals sign (assignment). I do know that much. =) Thanks again.

variable *= something
variable = variable * something
same thing

commented: *nods* +19

Wow seriously?? so it's the exact same as += and -=, I guess that makes sense. Thanks so much!

It's just a shorthand assignment operation on multiplication

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.