abstract continue for new switch
assert default goto package synchronized
boolean do if private this
break double implements protected throw
byte else import public throws
case enum instanceof return transient
catch extends int short try
char final interface static void
class finally long strictfp volatile
const float native super while
int a;
String b;
a = 1;
b = "hello java";
예를 들어 StringBuffer, List 자료형에 해당되는 변수는 다음과 같이 만들 수 있다.
StringBuffer sb;
List myList;
class Animal {
}
Animal cat;
cat 이라는 변수는 Animal 자료형 변수이다. cat이라는 변수에는 Animal 자료형에 해당되는 값만 담을 수 있다.
프로그램 소스코드에 프로그래머의 의견이나 설명을 적을 수 있는데 이런것을 주석(Comment)이라고 한다. 주석은 프로그램 소스에 삽입하더라도 프로그램 수행에 전혀 영향을 끼치지 않는다. 왜냐하면 컴파일 시 주석은 자동으로 제외되기 때문이다.
/*
사용자의 정보를 가져온다.
*/
public class getUserInfo {
...
int age; // 동물의 나이
https://wikidocs.net/book/31
https://ifuwanna.tistory.com/221