728x90
public class ExerciseCh2_6_2 {
public static void main(String[] args) {
System.out.println("1/2 = " + 1/2);
System.out.println("1/2.0 = " + 1/2.0);
}
}
반응형
'전.java' 카테고리의 다른 글
행렬의 행과 열을 바꾸는 메소드 transpose (0) | 2021.01.28 |
---|---|
예외 발생 (NullPointerException) (0) | 2021.01.28 |
문자 리터럴 (0) | 2021.01.28 |
integer, long, float, double의 최대, 최소 (0) | 2021.01.28 |
상수의 종류 (0) | 2021.01.28 |