새 작업을 시작하기 위해 클래스 개체를 만들고 있습니다. 하지만 입력 할 때 문제가 발생합니다."클래스"개체를 만들 수 없습니다.
Class ourclass = new Class.__
클래스를 인식하지 못하기 때문에 수퍼 클래스 "클래스"의 메서드를 사용할 수 없습니다. 클래스는 원시 타입이라고합니다. 클래스 이름을 전달하려는 "forName()"메서드를 사용하기 때문에 어떤 유형을 할당해야합니까? 다음은 코드입니다
protected void onListItemClick(ListView l, View v, int position, long id) {
// TODO Auto-generated method stub
super.onListItemClick(l, v, position, id);
try
{
Class ourclass =Class.__ // The suggestions for static functions doesn't popup, and I get errors
//Intent myintent = new Intent();
}
catch(ClassNotFoundException e)
{
e.printStackTrace();
}
}
}
감사합니다.
개체가 클래스의 내부 데이터 구조를위한 프록시이기 때문에 JVM에서 클래스를 만들도록해야합니다. –