Which code fragment, when inserted at line n1, enables the App class to print Equal?

Given the code fragment:

Which code fragment, when inserted at line n1, enables the App class to print Equal?

A. Option A
B. Option B
C. Option C
D. Option D

Download Printable PDF. VALID exam to help you PASS.

One thought on “Which code fragment, when inserted at line n1, enables the App class to print Equal?

  1. B
    public static void main(String[] args) {
    String str1 = “JAVA”;
    String str2 = new String (“java”);
    if (str1.equalsIgnoreCase(str2)){
    System.out.println(“Equal”);
    }else {
    System.out.println(“Not Equal”);
    }
    }

Leave a Reply

Your email address will not be published. Required fields are marked *


The reCAPTCHA verification period has expired. Please reload the page.