본문 바로가기

JAVA

Google Java Style Guide

728x90

google 코딩 스타일가이드

 

4.1 괄호

4.1.1 선택 사항인 경우에서도 중괄호가 사용됩니다.

if, else, for, do 및 while문 또는 body가 비어 있거나 단 하나의 문이 포함 된 경우에도 괄호가 쓰인다.

if (~){

    //todo

}

if (~) {}

 

4.6.1 수평 공백

예약어를 나누는 경우, if, for, catch 같은 예약어 이후 나오는 여는 괄호에서 사용

예약어를 나누는 경우, else 나 catch 같은 예약어 이후 나오는 닫는 중괄호에서 사용

if ( ~)

for (~)

 

https://google.github.io/styleguide/javaguide.html

 

Google Java Style Guide

1 Introduction This document serves as the complete definition of Google's coding standards for source code in the Java™ Programming Language. A Java source file is described as being in Google Style if and only if it adheres to the rules herein. Like ot

google.github.io

 

 

 

 

https://github.com/JunHoPark93/google-java-styleguide

 

GitHub - JunHoPark93/google-java-styleguide: Google의 Java StyleGuide를 번역한 문서 📝

Google의 Java StyleGuide를 번역한 문서 📝. Contribute to JunHoPark93/google-java-styleguide development by creating an account on GitHub.

github.com

 

'JAVA' 카테고리의 다른 글