Menu
Question Index
...

What will be the output of the following program?

public class StartsAndEnd {

    public static void main(String a[]) {
        String str = "There are many students with great application skills, we want to identify them and show them themselves and their capabilities.";
        System.out.print(str.startsWith("The") + ", ");
        System.out.print(str.endsWith("capabilities.") + ", ");
        System.out.print(str.endsWith("lities.") + ", ");
        System.out.print(str.startsWith("plication", 37) + ", ");
        System.out.println(str.subSequence(15, 39));
    }
}


true, true, true, true, students with great appl
true, true, false, false, students with great appl
true, true, true, false, students
Compilation Error  or Runtime Error

Doubts

Problems

Topic: Additional String Methods in Java

Read this topic
Take test on this topic

0
Wrong
Score more than 2 points

© meritcampus 2019

All Rights Reserved.

Open In App