Language Fundamentals

© examsiri.com
Question : 4 of 24
 
Marks: +1, -0
Given a class Repetition:
package utils;
public class Repetition{
  public static String twice(String s) { return s + s; }
}

and given another class Demo:
1. /*insert code here*/
2.
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"?
Go to Question: