質問

if I have two variables

boolean k = true;
boolean m = false;

what does the following do;

k &= m;
役に立ちましたか?

解決

That's the compound assignment operator, which is equivalent to:

k = (boolean)(k & m);
ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top