Strings are objects; and they have methods that you can
use on them. Here
is the api (Application programming interface) explaining the methods.
I'm tired of talking. Instead you will all do the talking. Each
of you, in groups of two are going to make a quick example in eclipse explaining one of the methods from the String class.
Each group must code a relevant example. Maybe
create a class with the method
Add to this google presentation.
public void testMyStringMethod (String sentString)
Comment clearly what the methods does,how you use it and show its use.
The methods on the AP are:
- compareTo(String str)
- equals(String str)
- indexOf (String str)
- substring(int begin, int end)
- substring(int begin)
Those not on the AP but that are relevant are: