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

chapter05 : literal 본문

JAVA/chapter02_variable_dataTaye

chapter05 : literal

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

public class Ex05_literal {
	public static void main(String[] args) {
		
		/*
		 * 출력할 내용
		 * 
		 * 1. A					-> char, String
		 * 2. 한					-> char, String
		 * 3. Hello World		-> String
		 * 4. 100				-> int
		 * 5. 3.141592			-> double
		 * 6. true				-> boolean
		 * 7. false
		 * 
		 * sysout 으로 값만 출력하지 말고,
		 * 변수에 담아서 해당 변수를 출력하도록
		 */
		
		
		char ch1 = 'A';
		String str1 = "A";
		String str2 = "Hello World";
		int num1 = 100;
		double num2 = 3.141592;
		boolean isTrue = true;

		System.out.println(ch1);
		System.out.println(str1);
		System.out.println(str2);
		System.out.println(num1);
		System.out.println(isTrue);
		
				
				
				
				
		
		
	}
}

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

chapter07 : castingEx  (0) 2023.05.25
chapter06 : casting  (1) 2023.05.25
chapter04 : String  (0) 2023.05.25
chapter03 : Primitive Type  (0) 2023.05.25
chapter02 : Variable_boundary  (0) 2023.05.25