【简答题】写结果:#include using namespace std; class A { int p1,p2; public: A(int a,int b) { p1=a; p2=b; } int Move1() { return ++p1; } int Move2() { return ++p2; } void Show() { cout<
【简答题】写结果 #include using namespace std; class A { int p1,p2; public: A(int a,int b) { p1=a; p2=b; } int Move1() { return ++p1; } int Move2() { return ++p2; } void Show() { cout<
【简答题】分析下列程序的执行结果,并填写再下划线处 #include #include using namespace std; class B; class A {int i; public: int set(B&); int get(){return i;} A(int x){i=x;} }; class B {int i; public: B(int x){i=x;} friend A; }; int...
【判断题】阅读程序写结果 class A{ private int privateVar; A(int _privateVar){ privateVar=_privateVar; } boolean isEqualTo(A anotherA){ if(this.privateVar == anotherA.privateVar) return true; else return false; } } pub...
【简答题】写出以下程序的运行结果。 public class EqualOrNot{ public static void main(String[] args){ B b1=new B(5); B b2=new B(5); System.out.println(b1==b2); System.out.println(b1.equals(b2)); } } class B{ int x; B( int y)...