본문 바로가기

코딩/Java, SpringBoot

(25)
[java]필드변수 멤버변수=전역변수(클래스안에서)=필드변수(java에서만 쓰는 듯) m.blog.naver.com/heartflow89/220956313502 [JAVA/자바] 필드(field) - 전역변수, 멤버변수 하나의 클래스는 필드(Field), 생성자(Constructor), 메소드(Method)로 구성된다. 그중 필드(Field)에 ... blog.naver.com
Java SE vs JDK vs JRE devbox.tistory.com/entry/%EC%8B%A4%ED%96%89 [Java] Java SE, JDK, JRE Java SE, JDK, JRE - Java SE(Java Platform, Standard Edition)는 자바의 표준안이다. 자바라는 언어가 어떠한 문법적인 구성을 가졌는지와 같은 것들을 정의하고 있다. 이것은 구체적인 소프트웨어가 아니고 그 devbox.tistory.com
[JAVA]파일을 찾을 수 없습니다. protik.tistory.com/entry/javaioFileNotFoundException-ex141-%EC%A7%80%EC%A0%95%EB%90%9C-%ED%8C%8C%EC%9D%BC%EC%9D%84-%EC%B0%BE%EC%9D%84-%EC%88%98-%EC%97%86%EC%8A%B5%EB%8B%88%EB%8B%A4 java.io.FileNotFoundException: ex14_1 지정된 파일을 찾을 수 없습니다) Java의 파일 I/O 관련해서 파일을 찾을 수 없다고 나올때 경로 설정을 잘못 한 것이였다. 밑에 주석 처리된 부분과 같이 파일이름을 적어주던가 , 아니면 프로젝트 바로 밑에 파일이 저장되있어 protik.tistory.com
[Java] the variable can only be null at this location(NullPointerException의 한 종류) 전역변수로 사용하기 위해 main함수의 첫 부분에 변수를 선언할 경우. 그리고 그 변수가 배열일 때는 Document[] mainDoc; 까지만 하면 안된다. 이 줄에는 경고가 뜨게 되는데 마우스를 갖다대 경고를 확인해 보면 the variable can only be null at this location이런 메시지가 뜬다.(실행했을 때 콘솔에 나오는 에러메시지는 NullPointerException임.) Document[] mainDoc=new Document[5];이런 식으로 선언해준 다음에 밑에서 배열요소들을 할당해야한다.
[Java ]error: unreported exception UnsupportedEncodingException; must be caught or declared to be thrown URLEncoder.encode()함수를 썼다. 자꾸 unreported exception UnsupportedEncodingException; must be caught or declared to be thrown 이런 에러를 발생시킴. 검색해보니 try-catch구문으로 감싸라는 충고가 있었음. try-catch구문으로 감싸주니 에러를 발생시키지도 않고 잘 돌아감.. 단순히 try-catch구문으로 감싸지 안아서 발생한 일인듯..
[Java] php의 var_dump()같은 함수 없나? https://stackoverflow.com/questions/301536/what-is-the-java-equivalent-of-php-var-dump What is the Java equivalent of PHP var_dump? PHP has a var_dump() function which outputs the internal contents of an object, showing an object's type and content. For example: class Person { private $firstName; private $lastName; pub... stackoverflow.com 답변요약: 그런거 없고 정 필요하면 toString()을 오버라이딩해서 사용해라!
[JAVA]variable is already defined in method main https://stackoverflow.com/questions/23148347/java-variable-is-already-defined-in-method Java: Variable is already defined in method I am trying to make a program which makes a random number between 1000-9999 with no repeating numbers. The rules are I have to label the random number as a String, and then use a while loop to figu... stackoverflow.com You've already define your variable answer2 in ..
에러처리 https://coding-factory.tistory.com/280 최상위 class가 아닌 애들은 전부 class정의할 때 예외를 다른 곳으로 throw 해주자!