본문 바로가기

Java31

Java 기본 배열 Array 학생 점수 관리 프로그램을 만들기          학생 3명의 수학 점수를 처리          첫번째 학생은 70점, 2번째 학생은 90점, 3번째 학생은 77점  int mathScore1 = 70; int mathScore2 = 90; int mathScore3 = 77; // 전체 총점 구하세요. System.out.println( mathScore1 + mathScore2 + mathScore3 ); // 평균 구하세요. System.out.println(( mathScore1 + mathScore2 + mathScore3 ) / 3); // 정수로만 계산하기때문에 소수점이 나오지 .. 2024. 12. 9.
Java의 기본 문법 - 클래스, 변수 1. 클래스객체를 생성하기 위한 설계도붕어빵 틀 = 클래스 / 붕어빵 = 객체하나의 클래스로부터 여러개의 객체를 만들 수 있다. 클래스로부터 객체를 생성하는 과정 생성된 객체  클래스 이름의 규칙네이밍 컨벤션(Naming Convention) - 가독성, 일관성을 위함여러 단어로 구성된 경우 각 단어의 첫 글자를 대문자로 작성)클래스명은 대문자로 시작클래스명은 명사로 public 클래스는 단하나 public 클래스 이름과 자바 파일 이름은 같아야 한다. 패키지 이름은 모두 소문자로.2. 프로그램은 1개의 main() 함수가 있어야 한다.public 클래스'psvm'(public static void main)을 입력하면 IntelliJ IDEA에서 Java의 main() 메소드가 자동으로 생성됨Java .. 2024. 12. 9.
Java란?, Java17 설치 및 환경변수 설정 Java란?Java는 1995년 썬 마이크로시스템즈(Sun Microsystems)에서 발표한 객체 지향 프로그래밍 언어로, 다양한 응용 프로그램을 개발하는 데 널리 사용됩니다.  자바 17 다운로드https://www.oracle.com/java/technologies/javase/jdk17-archive-downloads.html Java Archive Downloads - Java SE 17WARNING: Older versions of the JDK are provided to help developers debug issues in older systems. They are not updated with the latest security patches and are not recommended.. 2024. 12. 8.
Java intelliJ IDEA Community Edition 설치 설치 전 JDK 체크Oracle JDK 다운로드https://www.oracle.com/java/technologies/downloads/#java17?er=221886 Download the Latest Java LTS FreeSubscribe to Java SE and get the most comprehensive Java support available, with 24/7 global access to the experts.www.oracle.com운영체제에 맞는 JDK 다운로드CMD에서 java -version 입력하여 자바 버전 정보 출력여부 확인IntelliJ IDEA Community Edition란? JetBrains에서 개발한 무료 자바 통합 개발 환경(IDE)입니다. 주로 자바, Ko.. 2024. 12. 8.