전체 글38 [HTML / CSS] position 관련 정보 [링크] https://dlagusgh1.tistory.com/241?category=871565 2020. 11. 30. [Java] equals() 와 비교연산자 == 의 차이점에 대해 알아보자. 예제1) 비교연산자 == 의 사용 (같은 주소야?) class Main { public static void main(String[] args) { String str1 = "hello world"; // 주소. String str2 = "hello world"; // 주소가 같다. String str3 = new String("hello world"); // new 생성자로 인해 생성된 새 주소. String str4 = new String("hello world"); // new 생성자로 인해 생성된 또 다른 새 주소. // example 1 --------------------- true가 출력된다. if (str1 == str2) { System.out.println("ture"); } else .. 2020. 11. 24. [Java] 클래스 - 참조형 타입에 대해 알아보자. ※ 참조형 타입 기본형 타입을 제외한 모든 타입. 배열, 클래스등을 포함 String str = new String(); 여기서 str은 레퍼런스 변수 new 를 통해 메모리에 올라간 객체 (인스턴스)를 가리키는(또는 참조하는) 변수가 str. str은 변수 자체를 를 갖고 있는것이 아니라, 변수의 위치정보를 갖고있다. 2020. 11. 24. 이전 1 ··· 4 5 6 7 8 9 10 ··· 13 다음