본문 바로가기
JAVA

1일차(o t) //Hello World

by aesup 2021. 1. 11.
728x90

8bit = = 1 byte

 

0~255

8bit

1kbyte = =1024 byte

1m byte = = 1024 k  byte

1 g byte = = 1024 m byte5                                    

 

 

1. code 작성

2. compile (언어 -> 기계어)

3. build (실행파일을 작성)

-외부파일

4. link

5. execute

계속동작중 실시간으로 

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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
public class MainClass {
 
    public static void main(String[] args) {
        //주석문 : 설명 기입 가능 , 컴파일이 되지 않는다. 명시하는 문자열
        
        /*
        //범위 주석문
         코드를 설명할때 많이 사용 
         Oracle --
         Html <!-- -->
         JSP <%-- --%>
         python """
         # 한줄 주석문
         
         언어: c, java, objective-C, python
         C언어: 함수(function), 절차지향
         java: class, ( object ) 객체지향
         
         절차지향 : 1 ->2 ->3 //순서대로 진행된다
         객체지향 : 순서를 중시하지 않고 각종처리 중심, 1,2,3 - > 처리
                  
         출력output, 입력 input
         입력 input - > 계산(computer) ->출력output
         
         println 행바꿈
         print 행바꿈x
        */
        System.out.println("Hello World");
        System.out.print("Hello");
        System.out.print("World");
        
        System.out.println();// 개행
        
        System.out.println("World");
        
        System.out.println("한"); // " " - > 두개이상의 문자 -> 문자열
        System.out.println('한'); // ' ' - > 한개의 문자
        System.out.println('문' + "자열");
        
        System.out.println("123" + "4");
        System.out.println(123 + 5 +"4");
        System.out.println(123 + 5 +"4");
        System.out.println("123"+ 5 + 4);
        
        
        //printf
        System.out.printf("%c %d %f %s",'A'12123.456"hello");
        
        //escape sequence
        // \n \t \" \' \b
        System.out.print("\n hello \n");
        System.out.print("world\n");
        System.out.println("hi\nhello\nworld");
        System.out.println("hi\thello\tworld");
    
        System.out.println("\"홍길동\"입니다"); //따옴표 표시
        System.out.println("'홍길동'입니다"); //따옴표 표시
        
    }
 
}
 
cs

 

 

 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
Hello World
HelloWorld
World
문자열
1234
1284
1284
12354
A 12 123.456000 hello
 hello 
world
hi
hello
world
hi    hello    world
"홍길동"입니다
'홍길동'입니다
cs

 

 

 

 

728x90