转载自:http://www.cnblogs.com/heshan664754022/archive/2013/03/24/2979495.html 十年半山 今天在论坛闲逛的时候发现了一个很有趣的题目: package test; public class Test { public void myMethod(String str) { System.err.println("string"); } public void myMethod(Object obj) { System…
1.下面中哪两个可以在A的子类中使用:( ) class A { protected int method1 (int a, int b) { return 0; } } A. public int method 1 (int a, int b) { return 0; } B. private int method1 (int a, int b) { return 0; } C. private int method1 (int a, long b) { return 0; } D. publ…
)What is the output of running class Test? public class Test { public static void main(String[ ] args) { new Circle9(); } } public abstract class GeometricObject { protected GeometricObject() { System.out.print("A"); } protected GeometricObject(…
1)________ represents an entity(实体) in the real world that can be distinctly identified. 1) _______ A)A data field B) An object C)A method D) A class 2)________ is a construct that defines objects of the same type. 2) _______ A)A method B) A data fi…
package cn.bdqn.com; import java.util.Scanner; public class Jisaunqi { int num1; int num2; int jieguo; public void show(){ Scanner input=new Scanner(System.in); String fuhao1=input.next(); char fuhao2=fuhao1.charAt(0); switch(fuhao2){ case '+': jiegu…