下列【1】、【2】、【3】、【4】注释标注的哪行代码有错误?public interface Com {abstract void cry();//【1】public int x = 0;//【2】}abstract class Animal implements Com {public abstract void cry();}class E {public static void main(String args[]){Animal dog = null ; // 【3】dog = new Animal(); // 【4】}}
A. 【1】
B. 【2】
C. 【3】
D. 【4】
查看答案
给出下列【代码】注释标注的代码的输出结果。interface Com {public abstract char cry();}class Dog implements Com{public char cry(){return 'D';}}class Cat implements Com{public char cry(){return 'C';}}class People {Com com;char seeCry(Com com){return com.cry();}}public class E {public static void main(String args[]){People p = new People ();char c1 = p.seeCry(new Dog());char c2 = p.seeCry(new Cat());System.out.printf("%c:%c",c1,c2);//【代码】}}
interfaceCom{intadd(inta,intb);publicstaticintget(intn){returnn;}publicdefaultintsee(intn){returnn;}publicdefaultintlook(intn){returnn;}}classAimplementsCom{publicintadd(inta,intb){returna+b;}publicintsee(intn){returnn+1;}}publicclassMain{publicstaticvoidmain(Stringargs[]){Aa=newA();intm=a.add(12,6);intn=Com.get(12);intt=a.see(6);intq=a.look(6);System.out.printf("%d:%d:%d:%d",m,n,t,q);//【代码】}}
My roommate is _____________(drive) me crazy. She is a binge watcher.追剧者 She _________(stay up)熬放 very late ____________(watch)Game of Throne lately. She likes to ___________(keep) the light on but I find it hard to fall asleep with light on. Sometimes I woke up by her giggling咯咯. What should I do? I have no idea how to talk to her. Do you have any ___________(suggest)?
According to video 1, Vertov's work can perhaps best be described as constructive realism.
A. 对
B. 错