1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
maksim [4K]
3 years ago
8

Write an application that uses String method region-Matches to compare two stringsinput by the user. The application should inpu

t the number of characters to be compared andthe starting index of the comparison. The application should state whether the comparedcharacters are equal. Ignore the case of the characters when performing the comparison.
Computers and Technology
1 answer:
SOVA2 [1]3 years ago
3 0

Answer:

Explanation:

The following program creates a function called region_Matches that takes in two strings as arguments as well as an int for starting point and an int for amount of characters to compare. Then it compares those characters in each of the words. If they match (ignoring case) then the function outputs True, else it ouputs False. The test cases compare the words "moving" and "loving", the first test case compares the words starting at point 0 which outputs false because m and l are different. Test case 2 ouputs True since it starts at point 1 which is o and o.

class Brainly {

   public static void main(String[] args) {

       String word1 = "moving";

       String word2 = "loving";

       boolean result = region_Matches(word1, word2, 0, 4);

       boolean result2 = region_Matches(word1, word2, 1, 4);

       System.out.println(result);

       System.out.println(result2);

   }

   public static boolean region_Matches(String word1, String word2, int start, int numberOfChars) {

       boolean same = true;

       for (int x = 0; x < numberOfChars; x++) {

           if (Character.toLowerCase(word1.charAt(start + x)) == Character.toLowerCase(word2.charAt(start + x))) {

               continue;

           } else {

               same = false;

               break;

           }

       }

       return same;

   }

}

You might be interested in
What is the best method for modern businesses to authorize the use of workplace resources to its employees? a. assign them a use
Zielflug [23.3K]

The best method for modern businesses to authorize the use of workplace resources to its employees is to assign them a user authentication and password.

What is user authentication and password?

This is known to be what identifies a user when using the computer system or others.

Note that in the above, The best method for modern businesses to authorize the use of workplace resources to its employees is to assign them a user authentication and password.

Learn more about businesses from

brainly.com/question/24553900

#SPJ4

6 0
2 years ago
A technology called ______
sweet-ann [11.9K]

Answer:

innovative vaccine technologies,I guess~

3 0
3 years ago
Which type of hazzard are those substances which threathen you physical safety ?​
vovikov84 [41]

Answer:

98o

Explanation:

4 0
3 years ago
Which best describes the purpose of LoJack on a computer
iris [78.8K]

Answer:The purpose of the lo jack on a computer  to the lock and delete files on the computer devices.

Explanation:The lo jack on a computer to locate all the lock and delete files.

lo jack can provides the computer on the passwords that contains different levels of the bios access.

lo jack perform on the computer operating system provides on the boot only the trusted by the computer operating system.

Lo jack computer on the function is used to the published  the exam answers on the websites.

Lo jack insures to the data into hard drives to the correct computer password.

3 0
3 years ago
What is radial gradient in Flash CS3
djverab [1.8K]

Answer:

Radial gradients radiate from a center focal point. Both can be edited for color, alpha, and position within a fill or stroke. You can add up to 16 colors to a gradient, precisely control the location of the gradient focal point, and apply other parameters. A gradient behaves like any other fill or stroke.

8 0
3 years ago
Other questions:
  • Which activity constitutes legal computer activity?
    12·1 answer
  • Assignment 3: Chatbot
    11·2 answers
  • A laptop computer communicates with a router wirelessly, by means of radio signals. the router is connected by cable directly to
    10·1 answer
  • Technician A says that oil for the rod bearings comes from splash off the crankshaft. Technician B says that lubrication to the
    14·1 answer
  • Spreadsheet allow three types of cell addressing. They include ______addresses, such as $E$1, ______addresses, such as R$3, and
    12·1 answer
  • When I press F3, F4, and any of my apps on my mac why wouldn't it do anything? Do you have a way to solve this problem? When I p
    10·2 answers
  • What does the image depict:
    14·1 answer
  • ¿Que similitudes y que diferencias tenían el estado y la iglesia en el proceso de colonizacion de america?​
    6·1 answer
  • When working in outline mode, press __________ and click the eye icon to change only one layer back to preview mode.
    10·1 answer
  • 2023 murano’s available intelligent awd adjusts the ________ to help maintain cornering control.
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!