inblog logo
|
parangdajavous
    Java

    [Java] 1. Java의 특징

    김미숙's avatar
    김미숙
    Feb 03, 2025
    [Java] 1. Java의 특징
    Contents
    1. 객체지향 프로그램2. 클래스 이름 규칙3. 메서드 생긴 꼴4. 자바 실행 원리

    1. 객체지향 프로그램

    notion image

    2. 클래스 이름 규칙

    첫 글자를 대문자로 한다.

    3. 메서드 생긴 꼴

    notion image
    메서드이름 (){
     
     

    4. 자바 실행 원리

    notion image

    (1) .java → .class 컴파일

     
    notion image
     

    (2) static을 찾는다 (디버깅)

    package ex01; public class Var01 { // 1. 클래스 이름 (오브젝트) public void main(String[] args) { // 2. 메서드 (행위) 3. main (메서드 이름) int n1 = 10; System.out.println(n1); } }
    notion image
     

    (3) main 을 실행한다 (디버깅)

    package ex01; public class Var01 { // 1. 클래스 이름 (오브젝트) public static void main2(String[] args) { // 2. 메서드 (행위) 3. main (메서드 이름) int n1 = 10; System.out.println(n1); } }
    notion image
     

    (4) 성공

    package ex01; public class Var01 { // 1. 클래스 이름 (오브젝트) public static void main(String[] args) { // 2. 메서드 (행위) 3. main (메서드 이름) int n1 = 10; System.out.println(n1); } }
    notion image
     
     
    Share article
    Contents
    1. 객체지향 프로그램2. 클래스 이름 규칙3. 메서드 생긴 꼴4. 자바 실행 원리

    parangdajavous

    RSS·Powered by Inblog