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]
2 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]2 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
Another name for a computer's operating system
nadya68 [22]

Answer:

core engine or system software.

Explanation:

just because

5 0
3 years ago
Read 2 more answers
You have to display or connect to network shares on remote computers. Which command-line utility will you use to accomplish the
Xelga [282]

Answer:

net use X: \\SERVER\Share

Explanation:

1. Connect securely to the remote computer or ensure you have access to it on the network

2. then follow the step below:

Where X: is the drive letter you wish to map the share to, and \\SERVER\Share is the UNC path to the share. This should make the share visible in My Computer and the command line as well like all other shares mapped through the GUI.

In order to later disconnect the share, you would use

net use X: /delete

8 0
3 years ago
Linux distributions overview? information​
disa [49]

Answer:

Debian

Arch Linux

Ubuntu

Fedora

Manjaro

Linux Mint

Elementary OS

openSUSE

Explanation:

6 0
3 years ago
Which operating system might cause the desktop background to change unexpectedly?
Hunter-Best [27]
I used computers for 3 years now and i think its B
4 0
2 years ago
A network administrator has statically configured the LMI type on the interface of a Cisco router that is running Cisco IOS Rele
Sergeu [11.5K]

Answer:

The answer is "The LMI model should be compatible with the supplier dynamically for the network manager".

Explanation:

The term LMI stands for the "Local Management Interface", it is a Cisco technology, in which the signaling protocol was used in between routers and transmission frame switches to share data in timekeepers, global addressing, multipathing as well as the present state of virtual socks for various purposes, in which it is mainly used for "dynamically setting, in which the network administrator provides compatibility with the service provider".

8 0
3 years ago
Other questions:
  • Chloe is building a kiosk-based Excel application. She wants to make some modifications to the screen elements in order to keep
    8·1 answer
  • This stores a piece of data and gives it a specific name
    7·1 answer
  • Henry uses a laptop and has noticed that sometimes when he is typing, the cursor will move, causing him to mistype words or even
    12·1 answer
  • In Vista and Windows 7, the Appearance and Personalization option allows you to change the
    14·1 answer
  • What does SFA software provides tools for
    11·2 answers
  • What is the correct name for the words Home, Insert, Design, Layout, References, etc. in the ribbon in Word 2016?
    7·1 answer
  • Where is 5G being used and how fast is it?​
    5·2 answers
  • What is the purpose of a report?
    12·2 answers
  • What is a trojan horse
    8·2 answers
  • I am trying to make a flowgorithm chart for a dogs name, age, weight and when their weight is less than 50 OR more than 100 its
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!