Qiita Teams that are logged in
You are not logged in to any team

Log in to Qiita Team
Community
OrganizationAdvent CalendarQiitadon (β)
Service
Qiita JobsQiita ZineQiita Blog
Help us understand the problem. What is going on with this article?

【Java】ソースを書く際に…徒然覚書①

More than 3 years have passed since last update.

 ▼変数の宣言は、ループの中でするべきか外でするべきかよく考える
   ⇒スコープが短い方が、機械の処理時間が短くて済む

 ▼同じ事を言ってしまっている箇所に注意
   int i = a + b;
   int sum += i;

           ⇒ int sum += a+b;

               同じ事を言ってる箇所はまとめよう!

 ▼配列にするべきか否かをよく考える
   ⇒ 後から「○番目」等と指定して取り出す必要がある場合のみ

 ▼繰り返し処理に使われているものは変数にする

 ▼
Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away