Java
자바 - 데이터와 연산(부제: 숫자와 문자 그 외의 모든 데이터들.)
얄루몬
2021. 4. 29. 06:11
https://github.com/egoing/java1/commit/b127c30487d7d646413723d072b2d7000dac56a9
6.2. 데이터 타입 · egoing/java1@b127c30
Permalink This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository. Browse files 6.2. 데이터 타입 Loading branch information Showing 1 changed file with 22 additions and 0 deletions. +22 −0 Dat
github.com
public class Datatype{
public static void main(String[] args) {
System.out.println(6); // Number
System.out.println("six"); // String
System.out.println("6"); // String 6
System.out.println(6+6); // 12
System.out.println("6"+"6"); // 66
System.out.println(6*6); // 36
// System.out.println("6"*"6");
System.out.println("1111".length()); // 4
// System.out.println(1111.length());
System.out.println("Hello World"); //String 문자열
System.out.println('H'); //Char 문자
System.out.println("H");
}
}