Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
私はこのJavaコードを持っています:
重量 = 重量 == 0 ? 1 : 重量;
すべての場合に可変重量に何が起こるかを誰か説明できますか?
重みが 0 の場合、重みは 1 に設定され、それ以外の場合は変更されません。
多くの人は 3 進数が好きではありませんか? 読みにくいからです。あの人たちは書くだろう
if (weight == 0) { weight = 1; }
そして、彼らはそこにポイントを持っていると私は言います.