【简答题】Complete the definition of the member function in the following class. #include #include using namespace std; class str {private: char *st; public: str(char *a) {set(a); } str & operator=(____) {delet...
【简答题】public class Program { public static void main(String[] args) { String A = new String("java"); StringBuffer B = new StringBuffer("java"); st(A); sb(B); System.out.println(A); System.out.println(B); } ...
【简答题】public class StaticTest {static int x = 1;int y;static {x++;}StaticTest() {x++;y++;}public static void main(String args[]) {StaticTest st = new StaticTest();System.out.println("st.x=" + st.x);System.o...
【简答题】class A { void st() { System.out.println("Hello"); } } class B extends A { void st() { super.st(); System.out.println("Java"); } } public class Test04 { public static void main(String[] args) { A a = ...
【简答题】7 阅读程序,写出运行结果 class Student{ String stuName=" 学生 "; static int No=0; public Student() {No++; System. out .println(stuName+No);} public Student( int a) {No=a; System. out .println(stuName+a);} public v...