Given a class Repetition: 1.package utils; 2. 3.public class Repetition{ 4.public static String twice(Strings){returns+s;} 5.} and given another class Demo: 1.//insert code here2. 3.public class Demo{ 4.public static void main(String[]args){ 5.System.out.println(twice("pizza")); 6.} 7.} Which code should be inserted at line 1 of Demo.java to compile and run Demo to print“pizzapizza”?()
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;
G. static import utils.Repetition.twice;
查看答案
该试题由用户215****31提供
查看答案人数:28250
如遇到问题请
联系客服
正确答案
该试题由用户215****31提供
查看答案人数:28251
如遇到问题请联系客服