Single Choice Easy

QGive the output of the following program

// Give the output of the following program fragment:
class MCQClass {
	public static void main(String args[]){
		String s = "india", s1 = "IndIA", s2 = s;
		System.out.println(s.equals(s1));
		System.out.println(s.equalsIgnoreCase(s1));
		System.out.println(s2 == s);
		System.out.println(s.toUpperCase() == s1.toUpperCase());
		System.out.println(s.startsWith("IN".toLowerCase()));
		System.out.println(s1.endsWith("iA".toUpperCase()));
	}
}

ID: #22215 Introduction in String Java 100 views
Question Info
#22215Q ID
EasyDifficulty
Introduction in String JavaTopic

Choose the Best Option

Click any option to instantly check if you're correct.

  • A
    false
    true
    true
    false
    true
    true
  • B
    false
    false
    true
    false
    true
    true
  • C
    false
    false
    true
    true
    true
    true
Correct Answer

Explanation

Share This Question

Challenge a friend or share with your study group.