Menu
Question Index
...

Write a program to compare a specific region inside a string with another specific region in another string, irrespective of case sensitivity.

Input (Boolean, Integer, String, String, Integer, Integer) Output (Boolean)
true, 6, 'Yours Online Java School', 'ONLINE', 0, 4 true
true, 11, 'Welcome To MeritCampus', 'MERITCAMPUS', 0, 8 true
true, 3, 'computer', 'put', 1, 2 false
false, 18, 'Yours Online Java School', 'SchOOl', 0, 3 true
false, 11, 'Welcome To MeritCampus', 'MERITCAMPUS', 0, 8 false



class ComparingStringsWithRegionMatchesWithIgnoreCase
{
    public static void main(String s[])
    {
        String inputString = "Yours Online Java School";
        String subString = "ONLINE";
        System.out.println("Both regions of strings are equals : " + areEquals(true, 6, inputString, subString, 0, 4));

    }


    public static boolean areEquals(boolean isIgnoreCase, int startIndex, String inputString, String subString, int subStringStartIndex, int numberOfChars) {
    }

}

Doubts

Problems

Topic: Java regionMatches() Method - String Comparison

Read this topic
Take test on this topic

0
Wrong
Score more than 2 points

© meritcampus 2019

All Rights Reserved.

Open In App