package hamstercage;
public class Hamsteen {
public static void main(String[] args) {
System.out.println("Hello World!");
int berry=12;
int blueberry=24;
int temp;
System.out.println(berry+""+blueberry);
temp=blueberry;
blueberry=berry;
berry=temp;
System.out.println(berry+""+blueberry);
}
}
클래스명과 변수명
- 클래스명은 대문자부터
- 변수명은 소문자부터
- 단어가 달라질 때마다 대문자를 쓴다.
출력
- 인자가 문자일 때는 " "가 들어가고 그렇지 않으면 그대로 쓴다.
- 정수와 정수사이에 플러스는 더하는 용도로 쓰이고 정수와 문자에는 이어주는 용도로 쓰임. 정수+정수 (x) / 정수+문자(o)
자바에서는 경우에 따라 초기화를 해줘야 한다.
<피드백 해주셔도 됩니다.>