<em>A</em><em> </em><em> </em><em>WAn</em><em> </em><em>(</em><em> </em><em>Wide</em><em> </em><em>Area</em><em> </em><em>Network</em><em> </em><em>)</em><em> </em><em>is</em><em> </em><em>made</em><em> </em><em>up</em><em> </em><em>of</em><em> </em><em>LANS</em><em> </em><em>(</em><em> </em><em>Local</em><em> </em><em>Area</em><em> </em><em>Network</em><em>)</em><em>…</em><em>…</em><em>…</em><em>…</em>
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.
What is your question? I’ll try my best to help
3D printing helps to reduce the time it takes for a manufacturer to create the product. This lets manufacturers invest their time to make flawless products because the production cycle time is reduced.