<<< Parse address example | Index | String charAt( ) and concatenation example >>> |
Code that adds dashes to a phone number:
String phoneNumber1 = "9775551212"; String phoneNumber2 = phoneNumber1.substring(0, 3); phoneNumber2 += "-"; phoneNumber2 += phoneNumber1.substring(3, 6); phoneNumber2 += "-"; phoneNumber2 += phoneNumber1.substring(6);
<<< Parse address example | Index | String charAt( ) and concatenation example >>> |