1.判断下列代码的运行情况 public class TestExtends { public static void main(String[] args) { Father obj = new Son(); System.out.println(obj.getEle()); } } class Father{ public int getEle(){ return 1; } } class Son extends Father{ public float getEle(){ return 2…
一.阿里巴巴笔试题: public class T implements Cloneable { public static int k = 0; public static T t1 = new T("t1"); public static T t2 = new T("t2"); public static int i = print("i"); public static int n = 99; public int j = print(&q…
一.阿里巴巴笔试题: public class T implements Cloneable { public static int k = 0; public static T t1 = new T("t1"); public static T t2 = new T("t2"); public static int i = print("i"); public static int n = 99; public int j = print(&q…
首先很经典的阿里巴巴面试题 加上我自己的一些疑惑代码 public class Text { public static int k = 0; public final int k1 = 3; //自己加的 public static Text t1 = new Text("t1"); public static Text t2 = new Text("t2"); public static int i = print("i"); public…