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, 24));
    }
}


true, true, true, true, students with great appl
true, true, true, false, students
true, true, true, true, students
Some other output
Compilation Error  or Runtime Error

Doubts

Problems

Topic: Java Comparable Interface with Example

Read this topic

0
Wrong
Score more than 2 points

© meritcampus 2019

All Rights Reserved.

Open In App