私はある種の特定の問題を抱えています。
public interface A {
}
//------------------------------
public class B implements A {
static int countx = 0;
}
//----------------------------------
public class C implements A {
static int county = 0;
}
//----------------------------------
public class Arc {
public A from;
public A to;
//========================================
そして今、私はオブジェクトa(Arcのインスタンス)を持っていて、それがBまたはCのインスタンスであるかどうかを調べ、属性countXまたはcountY(a.from.countXのようなstg)に到達したいのですか?:)