搜题
用户您好, 请在下方输入框内搜索其它题目:
搜题
题目内容 (请给出正确答案)
提问人:网友 发布时间:
【单选题】

Given a class Repetition:<br /> 1.package utils;<br /> 2.<br /> 3.public class Repetition{<br /> 4.public static String twice(Strings){returns+s;}<br /> 5.}<br /> and given another class Demo:<br /> 1.//insert code here2.<br /> 3.public class Demo{<br /> 4.public static void main(String[]args){<br /> 5.System.out.println(twice("pizza"));<br /> 6.}<br /> 7.}<br /> Which code should be inserted at line 1 of Demo.java to compile and run Demo to print&ldquo;pizzapizza&rdquo;?()

A、import utils.*;

B、static import utils.*;

C、importutils.Repetition.*;

D、static importutils.Repetition.*;

E、import utils.Repetition.twice();

F、import static utils.Repetition.twice;

H、static import utils.Repetition.twice;

更多“ Given a class Repetition:<br /> 1.package utils;<br /> 2.<br /> 3.public class Repetition{<br /> 4.public static String twice(Strings){returns+s;}<br /> 5.}<br /> and given another class Demo:<br /> 1.//insert code here2.<br /> 3.public class Demo{<br /> 4.public static void main(String[]args){<br /> 5.System.out.println(twice("pizza"));<br /> 6.}<br /> 7.}<br /> Which code should be inserted at line 1 of Demo.java to compile and run Demo to print&ldquo;pizzapizza&rdquo;?()”相关的问题
第1题

Aany class  B、only the Target class  C、any class in the test package  D、any class that extends Target  

点击查看答案
第2题

A、It can be any class.  B、No class has access to base.  C、The class must belong to the geometry package.  D、The class must be a subclass of the class Hypotenuse.  

点击查看答案
第3题

A、Compilation succeeds.  B、Exactly one class does NOT compile.  C、Exactly two classes do NOT compile.  D、Exactly four classes do NOT compile.  E、Exactly three classes do NOT compile.  

点击查看答案
第4题

AA.Point p = new Point();  B、B.Line.Point p = new Line.Point();  C、C.The Point class cannot be instatiated at line 15.  D、D.Line l = new Line() ; l.Point p = new l.Point();  

点击查看答案
第5题

A、public class MinMax<?> {  B、public class MinMax<? extends Number> {  C、public class MinMax<N extends Object> {  D、public class MinMax<N extends Number> {  E、public class MinMax<? extends Object> {  F、public class MinMax<N extends Integer> {  

点击查看答案
第6题

AA.public class Circle implements Shape {private int radius;}  B、B.public abstract class Circle extends Shape {private int radius;}  C、C.public class Circle extends Shape {private int radius;public void draw();}  D、D.public abstract class Circle implements Shape { private int radius;public void draw();}  E、E.public class Circle extends Shape {private int radius;public void draw() {/* code here*/}}  

点击查看答案
第7题

AA.double getSalesAmount() { return 1230.45; }  B、B.public double getSalesAmount() { return 1230.45; }  C、C.private double getSalesAmount() { return 1230.45; }  D、D.protected double getSalesAmount() { return 1230.45; }  

点击查看答案
第8题

AA.It can be any class.  B、B.No class has access to base.  C、C.The class must belong to the geometry package.  D、D.The class must be a subclass of the class Hypotenuse.  

点击查看答案
第9题

A、The class implements java.lang.Comparable.  B、The class implements java.util.Comparator.  C、The interface used to implement sorting allows this class to define only one sort sequence.  D、The interface used to implement sorting allows this class to define many different sort sequences.  

点击查看答案
客服
TOP

请使用微信扫码支付

订单号:
遇到问题请联系在线客服