根据下面的代码,判断下面那些叙述是正确的?
public class HouseKeeper{
private TimeCard timecard;
public void clockIn(){
timecard.punch();
}
}
public class HouseKeeper{
private TimeCard timecard;
public void clockIn(){
timecard.punch();
}
}
举一反三
- 参考下图和代码,下面哪句话是正确的?( ) public class JungleSimulator { private XXX aVar public void simulate(){ aVar.jump(); } }[img=332x189]17a3da99c27de71.png[/img]
- 根据下面给出的代码,判断那个叙述是对的?public class Person{static int arr[]=new int[10];public static void main(String a[]){System.out.println(arr[1]);}}
- 下面关于类的声明,正确的是 A: public void HH{…} B: public void HH(){…} C: public class void number{} D: public class Car{…}
- 下面关于类的声明,正确的是_____ A: public class Student{…} B: public void ST{…} C: public void th(){…} D: public class void num{ }
- 从下面四段代码中选择出正确的代码段() A: public class Something {public static void main(String[] args) {Other o = new Other();new Something().addOne(o);}public void addOne(final Other o) {o.i++;}}class Other {public int i;} B: public class Something {void doSomething () {private String s = ̶”;int l = s.length();}} C: abstract class Name {private String name;public abstract boolean isStupidName(String name) {}} D: public class Something {public int addOne(final int x) {return ++x; }}