헤드 퍼스트 자바

헤드 퍼스트 자바를 공부하면서 푼 문제들 정리

Chapter 10

기본값

  • 원시 정수(long, short 등) : 0
  • 원시 부동소수점수(float, double) : 0.0
  • 부울 : false
  • 객체레퍼런스 : null

연필을 깍으며

public class TestBox {
	Integer i;
	int j;
 
	public static void main(String[] args) {
		TestBox t = new TestBox();
		t.go();
	}
 
	public void go() {
		j = i;
		System.out.println(j);
		System.out.println(i);
	}
}

정답

java/head_frist_java.txt · 마지막 수정: 2008/05/19 22:41 작성자 miracle
www.chimeric.de Creative Commons License Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0