개발 기록/Java2 [JAVA] Error(The local variable num may not have been initialized) Exception in thread "main" java.lang.Error: Unresolved compilation problem: The local variable num may not have been initialized 해당 에러는 java에서 변수를 선언하는 과정에서 최기화를 하지 않아서 발생하는 문제이다. 즉, int num은 선언하였지만 해당 변수의 값이 없는 상태에서 사용되기 때문에 초기화 문제가 나타났다. 에러 코드 public class Test { public static void main(String[] args) { int num; System.out.print(num); } } 해결 코드 public class Test { public static void main(Strin.. 2022. 1. 4. [Java] 윈도우즈에 openJDK 11 설치하기 내가 주로 사용한 자바 버전은 11이였기 때문에 해당 버전에 맞게 포스팅을 하고자 한다. 순서 OpenJDK 다운로드 압축풀기 및 파일 이동 시스템 환경변수 및 경로 지정 Windows에 OpenJDK 11을 설치 1. OpenJDK 다운로드 1. OpenJDK 다운로드 페이지 접속 https://jdk.java.net/archive/ Archived OpenJDK GA Releases Archived OpenJDK General-Availability Releases This page is an archive of previously released builds of the JDK licensed under the GNU General Public License, version 2, with Class.. 2021. 10. 27. 이전 1 다음