private static String removeFromString(String old, String frag)
{
int i = old.indexOf(frag);
while (i> -1) {
String rest = old.substring(i + frag.length());
System.out.println("rest = " + rest);
old = old.substring(0, i);
System.out.println("rest = " + old);
old = old + rest;
System.out.println("rest = " + old);
i = old.indexOf(frag);
System.out.println("i = "+ i);
}
return old;
}
Here the index of first occurrence is obtained outside the “while loop” and if this loop runs until index value is >-1. It extracts the rest of the characters other than “frag” from the index and all the characters for which the given set of characters are removed.
Answer:
For the browser to display multiple spaces, Maeve must use in her code to create more spaces.
Explanation:
is known as hard space or fixed space. NBSP stands for Non-Breaking Space. The statement will continue without breaking into another line.
Maeve can easily use the many times to get the required space she needs.
The Rudolph Rule states that simple ways you can make information stand out and guide or satisfy your audience to important details and highlight important information in your presentation
so i conclude option D is correct for above statement
hope it helps
Answer: By understanding the basic cultural values of the individual such as looks and talk. Also understanding the core values of the individual such as attitude, beliefs and religion. It would improve the behavior in your professional and cultural relationship with individuals in your workplace.
Explanation:
Answer:
Option B and C are the correct answer for the above question
Explanation:
The above question asked about the work of the programmer to catch an error of the program--
- Then the option B states that the programmer needs to prints the value of the various program variable on every line of the program which is the correct solution because it is used to find the error easily. It defines the value of every variable in every place of the program and the programmer caught the error statement in the program if anywhere the variable gets the false value.
- The C option states to help from a friend, it is also a good solution because the friend can easily be caught the error of the program by seeing every line of code.
- But the other option is not correct because the option A states that the change the name of the variable which is not a result of anything.
- And the option D states that the code will be retyped again which is also not justify anything.