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.
The <u>control class</u> acts as a switchboard between the view layer and the domain layer.
Explanation:
As the name suggests, the control class is responsible for performing the control actions. The view layer defines the entities and attributes which have to be viewed and their structural organization.
The domain layer consists of all the entities, attributes, and relations in the data. The control class controls the flow of information between the two layers and performs the operations of filtering and selecting the content to be displayed.
C. system software
if it means drivers and so on
Answer:
These are some way I know