<<< substring( ) method | Index | String concatenation example >>> |
Code that parses a String containing a tab-delimited address:
String address = "805 Main Street\tDallas\tTX\t12345"; address = address.trim(); String[] addressParts = address.split("\t"); String street = addressParts[0]; String city = addressParts[1]; String state = addressParts[2]; String zip = addressParts[3];
<<< substring( ) method | Index | String concatenation example >>> |