반응형
public class Test02 {
/*
* source file name = class name(must do)
* it can change class name F2 on left side of Package explorer java file
*
*/
public static void main(String[] args){
//sysout = system.out.println
System.out.println(3.14 + 10);
System.out.println("피카츄 "+"라이츄");
System.out.println(10+20+"피카츄"); // 30 피카츄 First integer
System.out.println("피카츄"+10+20); // 피카츄1020 First String
System.out.println(10+20+"피카츄"+10+20); //if exiting a String, seqence
System.out.println();
System.out.println(10*20+100);//priority *
System.out.println(5 + 10/5);//priority /
//there is no space in the console just viewing in program code.
System.out.print("A");
System.out.print("B");
System.out.print("C\nD");
// '\n' : going to the next line.
System.out.printf("%d",10);
}
}
반응형
'IT > Programming' 카테고리의 다른 글
<Effective Java> RULE 78 직렬화된 객체 대신 직렬화 프록시를 고려해 보라 (1) | 2023.04.25 |
---|---|
[JAVA] helloworld print 예제 (0) | 2023.04.25 |
[JAVA] 원의 넓이 출력 예제 (0) | 2023.04.25 |
[JAVA] data type 자료형 예제 (0) | 2023.04.25 |
[JAVA] various(변수) 예제 (0) | 2023.04.25 |