Notice
Recent Posts
Recent Comments
Link
«   2024/07   »
1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30 31
Tags
more
Archives
Today
Total
관리 메뉴

WON.dev

chapter07 : castingEx 본문

JAVA/chapter02_variable_dataTaye

chapter07 : castingEx

GAWON 2023. 5. 25. 15:12
package org.joonzis.ex;

public class Ex07_castingEx {
	public static void main(String[] args) {
		
		// 1. 줄 바꿈
		System.out.println();
		
		// 2. 숫자 + 연산자
		System.out.println(1 + 1);
		System.out.println(1.5 + 1);
		
		// 3. 문자열 + 연산자
		System.out.println("Hello " + "Java");
		
		// 4. 숫자와 문자열 + 연산자
		System.out.println(100 + "원");
		System.out.println(100 + 100 + "원");
		System.out.println("$" + 100);
		System.out.println("$" + 100 + 100);
		
		
	}
}

'JAVA > chapter02_variable_dataTaye' 카테고리의 다른 글

chapter09 : escape  (0) 2023.05.25
chapter08 : parsing  (0) 2023.05.25
chapter06 : casting  (1) 2023.05.25
chapter05 : literal  (0) 2023.05.25
chapter04 : String  (0) 2023.05.25