JAVA题库:格林模拟试题二(下)4
来源:优易学  2010-1-15 11:39:42   【优易学:中国教育考试门户网】   资料下载   IT书店

Question 52)
Given the following class definition, which of the following methods could be legally placed after the comment
//Here public class Rid{        public void amethod(int i, String s){}        //Here}
1)public void amethod(String s, int i){}
2)public int amethod(int i, String s){}
3)public void amethod(int i, String mystring){}
4) public void Amethod(int i, String s) {}

Question 53)
Given the following class definition which of the following can be legally placed after the comment line
//Here ?
class Base{public Base(int i){}}public class MyOver extends Base{public static void main(String arg[]){                MyOver m = new MyOver(10);                }        MyOver(int i){                super(i);        }        MyOver(String s, int i){                this(i);                 //Here        }}
1)MyOver m = new MyOver();
2)super();
3)this("Hello",10);
4)Base b = new Base(10);

Question 54)
Given the following class definition, which of the following statements would be legal after the comment //Here
class InOut{String s= new String("Between");        public void amethod(final int iArgs){       int iam;              class Bicycle{                       public void sayHello(){                        //Here                        }                }//End of bicycle class        }//End of amethod       public void another(){       int iOther;       }}
1) System.out.println(s);
2) System.out.println(iOther);
3) System.out.println(iam);
4) System.out.println(iArgs);

[1] [2] 下一页

责任编辑:cyth

文章搜索:
 相关文章
热点资讯
资讯快报
热门课程培训