오류노트 19

구글 시트 오류노트 주소 백업

https://docs.google.com/spreadsheets/d/1PSoHXeXBBCTN1ZZyUyjuF4NeTK9UULXpqRJZU0x9swQ/edit?usp=sharing 송다예 오류노트 JAVA JS ; 미입력,Exception in thread "main" java.lang.Error: Unresolved compilation problem: Syntax error, insert ";" to complete BlockStatements at a.main(a.java:6) ,at a.main(a.java:6): 6번 줄 변수 이름이 중복됨,duplicate local variable b,in docs.google.com 블로그에 작성한 오류노트도 구글시트에 백업할 예정

오류노트 2024.03.25

[코딩 오류노트] `com.mysql.jdbc.Driver'. This is deprecated. 해결방법

JSP/Java를 DB와 연결하는 과정에서 다음과 같은 오류 메시지가 나왔다. Loading class `com.mysql.jdbc.Driver'. This is deprecated. The new driver class is `com.mysql.cj.jdbc.Driver'. The driver is automatically registered via the SPI and manual loading of the driver class is generally unnecessary. 클래스 주소가 바뀌었으니 수정해서 적으라고 한다. 알려준 대로 cj를 추가해서 다음과 같이 적으면 해결된다. Class.forName("com.mysql.cj.jdbc.Driver");

오류노트 2023.12.28

[코딩 오류 노트] 싱글턴 패턴 객체 생성

주말을 맞아 java 복습을 하다가 싱글턴 패턴으로 객체 주소를 가져오게 되어있을 때 new를 사용해 객체를 생성하면 어떻게 되는지 궁금해져서 해봤다. package Practice; import java.time.LocalDate; public class TimePlus { public static void main(String[] args) { LocalDate ld = new LocalDate(); LocalDate ld2 = LocalDate.now(); System.out.println(ld); System.out.println(ld2); } } 오류 메시지 Exception in thread "main" java.lang.Error: Unresolved compilation problem: T..

오류노트 2023.11.26

[javascript] 함수 참조와 함수 호출

1. 함수 참조와 함수 호출 a.onclick = hidedetail(); a.onclick = function(){ hidedetail(); } 이 두 코드의 차이를 몰라서 헤매다가 챗 gpt로 해결했다. function() 안에 넣지 않은 경우, hidedetail()을 호출해서 리턴값을 a.onclick에 저장하라는 코드가 된다. function() 안에 넣으면 hidedetail()을 호출하는 익명 함수를 만들어 a.onclick에 할당하는 코드가 된다. 다만 호출할 함수가 다른 파일에 있을 경우이고, 같은 파일 내에 있으면 a.onclick = hidedetail 과 같이 호출할 수 있다.

오류노트 2023.11.23

[코딩 오류 노트] 자바스크립트

1. let 변수 중복 선언 오류 메시지 Uncaught SyntaxError: Identifier 'a' has already been declared 코드 var a = 10; let a = 10; 2. const 값 변경 오류 메시지 Uncaught TypeError: Assignment to constant variable. 코드 const c = 10; c = 20; 3. eval()에 들어갈 값에 let으로 변수 선언 오류 메시지 Uncaught ReferenceError: num7 is not defined at a (encode.js:38:17) at encode.html:12:9 코드 let str1 = 'let num7 = 10'; let str2 = 'let num8 = 20'; ev..

오류노트 2023.11.22