안드로이드 개발 질문/답변
(글 수 45,052)
static boolean b_1 = false;
static boolean b_2 = false;
static boolean b_3 = true;
static boolean b_4 = false;
static ArrayList<TestType> array = new ArrayList<TestType>();
array.add(new TestType(0, b_1));
array.add(new TestType(1, b_2));
array.add(new TestType(2, b_3));
array.add(new TestType(3, b_4));
==============
public class TestType{
public int index;
public boolean isCheck;
public TestType(int index, boolean isCheck){
this.index = index;
this.isCheck = isCheck;
}
}
array.get(2).isCheck = false 로 바꾸면
static boolean b_3 = true; 이것두 false로 바뀌게 하고 싶습니다..
c++은 *, c#은 & 이렇게 참조형 파라미터 정의햇는데 자바는 어떻게 하는지..
static boolean b_2 = false;
static boolean b_3 = true;
static boolean b_4 = false;
static ArrayList<TestType> array = new ArrayList<TestType>();
array.add(new TestType(0, b_1));
array.add(new TestType(1, b_2));
array.add(new TestType(2, b_3));
array.add(new TestType(3, b_4));
==============
public class TestType{
public int index;
public boolean isCheck;
public TestType(int index, boolean isCheck){
this.index = index;
this.isCheck = isCheck;
}
}
array.get(2).isCheck = false 로 바꾸면
static boolean b_3 = true; 이것두 false로 바뀌게 하고 싶습니다..
c++은 *, c#은 & 이렇게 참조형 파라미터 정의햇는데 자바는 어떻게 하는지..



