stackoverflow 3

Is Java “pass-by-reference” or “pass-by-value”? | Stack Overflow 정리

본 내용은 Stack Overflow의 한국어 번역이 아니며, 개인적인 공부를 위해 Stack Overflow 질의를 정리한 내용입니다 질문 자바는 'pass-by-refence'인가요, 'pass-by-value'인가요? I always thought Java uses pass-by-reference. However, I've seen a couple of blog posts (for example, this blog) that claim that it isn't (the blog post says that Java uses pass-by-value). I don't think I understand the distinction they're making. What is the explanation? ..

Language/Java 2020.12.13

How do I compare strings in Java? | Stack Overflow 정리

본 내용은 Stack Overflow의 한국어 번역이 아니며, 개인적인 공부를 위해 Stack Overflow 질의를 정리한 내용입니다 질문 Java에서 문자열을 어떻게 비교해야 합니까? I've been using the == operator in my program to compare all my strings so far. However, I ran into a bug, changed one of them into .equals() instead, and it fixed the bug. Is == bad? When should it and should it not be used? What's the difference? 저는 문자열 비교를 위해 지금까지 ==를 사용해왔습니다. 그런데 버그가 났습니다..

Language/Java 2020.12.11

What is a NullPointerException, and how do I fix it? | Stack Overflow 정리

본 내용은 Stack Overflow의 한국어 번역이 아니며, 개인적인 공부를 위해 Stack Overflow 질의를 정리한 내용입니다 질문 Null pointer Exception이란 무엇이며, 어떻게 해결해야 합니까? What are Null Pointer Exceptions (java.lang.NullPointerException) and what causes them? What methods/tools can be used to determine the cause so that you stop the exception from causing the program to terminate prematurely? Null Pointer Exceptions(java.lang.NullPointerExcep..

Language/Java 2020.12.08