0

Q1

package utils; public class Repetition{ public static String twice(String s){ return s+s;} } and given another class Demo: //insert code here public class DEmo{ public static void main(String[] args){ System.out.print(twice("pizza")); } } Which code should be inserted? A)import utils.*; B)static import utils.*; C)import utils.Repetition.*; D)static import utils.Repetition.*; E)import utils.Repetition.twice(); F)import static utils.Repetition.twice; G)static import utils.Repetition.twice;

26th Mar 2017, 6:27 PM
Kuldeep Kaluvala
Kuldeep Kaluvala - avatar
1 Answer
+ 12
Homework? The best way to solve this is to try it out in an ide. If you need further information, pls describe what exactly you need to know.
24th Apr 2017, 10:00 PM
Tashi N
Tashi N - avatar