728x90 전체보기113 call by reference/value call by reference : 배열call by value : 기본 자료형 2013. 2. 20. static, final 클래스 변수 static- 전역변수 개념- 그 클래스로부터 생성된 모든 객체들이 하나의 클래스 변수를 공유함 종단변수 final- 단 한번 초기화 가능, 이후에는 변경 불가능 2013. 2. 20. System.out.println() 이 함수는, 8진수, 16진수를 써도 10진수로 변환되어 출력된다 2013. 2. 20. 자동 형변환 변수1변수2결과 값 byte byte int byte short int int byte int short int int int int int 변수1변수2결과 값 long int long long long long byte float float int float float long float float float double double double double double int보다 작거나 같은 형이 연산된 결과 값은 모두 int-> JAVA는 4바이트 단위로 처리하기 때문 4바이트 이상의 변수들의 연산은 자료형이 큰 쪽으로 형 변환 된다. ex)byte b1=1;byte b2=2; byte b3 = b1+b2; (x)int b3 = b1+b2; (o) 2013. 2. 20. 이전 1 ··· 13 14 15 16 17 18 19 ··· 29 다음 728x90