정리/Java

자바의 정석 10강 화면에 글자 출력하기, 덧셈뺄셈 계산하기

민발자 2023. 4. 25. 21:41
728x90

자바의 정석 기초편(2020최신)

ch 2-1,2 화면에 글자 출력하기, 덧셈 뺄셈 계산하기

public static void main(String[] args) {
		System.out.print("hello");
		System.out.print("hello");
        
		System.out.println("hello"); //줄바꿈
		System.out.println("hello");
        
		System.out.println(5+3); //덧셈
		System.out.println(5-3); //뺄셈
		System.out.println(5*3); //곱셈
		System.out.println(5%3); //나머지
		System.out.println(5/3); //나눗셈
	}

 

System.out.println(); 출력 후 줄바꿈

System.out.print(); 출력 후 줄바꿈 안함

 

 

 

 

#Eclipse 단축키

alt + shift + a 멀티 칼럼 편집

ctrl + alt + shift + down 행단위 복사

 

728x90