Link to home
Start Free TrialLog in
Avatar of ikhmer
ikhmer

asked on

what is splite function in java?

Dears,

Does java has splite function ? eg: i have String myStr="a;b;c;d"
i want to make it into array list splite by ";" and get the last value of this array ==> the result could be "d"

Thanks,
ASKER CERTIFIED SOLUTION
Avatar of Mick Barry
Mick Barry
Flag of Australia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Or better way

String[] split = myStr.split(";");
String d = split[split.length - 1];

NO POINTS for me. I am just copying what objects said. Full points to objects.

David
Avatar of ikhmer
ikhmer

ASKER

thanks all.. :-)