왜 출력이 잘못 인쇄됩니까?ArrayList 요소를 읽으십시오
ArrayList<String> loc = new ArrayList<String>();
ArrayList의이 값 저장 :
[topLeft, topLeft, topLeft, bottomLeft, topLeft, bottomLeft, topLeft, topLeft, Left, topLeft]
을 전나무 인덱스 0은 = 좌상
if(loc.get(1)=="topLeft")
System.out.println("same")
else {
System.out.println("not same")
}
이 프로그램의 인쇄가 잘못된 출력 not same
대신 same
정말 고마워요. 어떻게 그걸 놓칠 수 있니? :-) – Jessy