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.

Re: a very simple java question... 80 80

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.

Re: a very simple java question... 80 80

variable *= something
variable = variable * something
same thing

commented: *nods* +19
Re: a very simple java question... 80 80

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

Re: a very simple java question... 80 80

It's just a shorthand assignment operation on multiplication

Be a part of the DaniWeb community

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