I have a method that returns a String
. That string called contact
is made of multiple smaller strings. Those smaller strings were parameters to that method.
exemple :
String contact = id + " " + name + " " + telNum;
return contact;
Now I have another method that takes contact
as a parameter but that needs to return ONLY name.
So my question is how can I isolate that smaller string name
from the whole string contact?