0
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

【Java】ソースの書き方のメモ

Last updated at Posted at 2017-12-12

今日、新しい単語を一つ知った。
【コーディング規約】という言葉。
もちろん、現場による微妙な違いはあるかと思うけれど
すっきりしたソースにはやはり美しさのルールがありました☆

なかなかすぐには身に着かないけれど…先輩曰く
「チェックシートを作ってチェックする様に」との事。
早速このメモとは別にエクセルシートを作りました。

というわけで、メモメモ。

 ■{(波かっこ)の前に【スペース】

 ■ 、(カンマ) の後ろに【スペース】

 ■ =、+、<、>、 の前後に【スペース】

 ■ if文において、elseやelse ifは…ifの閉じかっこ } の後ろにスペースをつけて続ける

  if(int i = 0; i < a.length; i++) {
  
  } else {
  
  }

 ■ インデントに心を配る(段落はどうなっているのか確認する)

0
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?