Java SE 8 Programmer 1Z0–808 Practice Full Test 1

© examsiri.com
Question : 22 of 84
 
Marks: +1, -0
You are developing a banking module. You have developed a class named ccMask that has a maskcc method.
Given the code fragment:
class CCMask {
  public static String maskCC(String creditCard) {
    String x = "XXXX-XXXX-XXXX-";
    // line n1
  }

  public static void main(String[] args) {
    System.out.printIn(maskCC("1234-5678-9101-1121"));
  }
}

You must ensure that the maskcc method returns a string that hides all digits of the credit card number except the four last digits (and the hyphens that separate each group of four digits).
Which two code fragments should you use at line n1, independently, to achieve this requirement? (Choose two.)
Go to Question: