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 it gives u points I think
Explanation:
Answer:
Explanation:
.1 Display all information from the customer table for all customers that have a balance that is greater than the average balance.
2. Display all information from the rep table for all representatives that have a rate which is equal to the minimum rate for representatives.
3. Display each unique description and price (no duplicates) for all parts that have a quoted price that is greater than the average quoted price for all parts ordered.
4. List all streets where either a customer or a representative is located
Answer:
D. The need to slow down more often in life.
#1 is A and #2 is B, but I don't know about #3 and #4.