<<< String concatenation example | Index | String compareToIgnoreCase( ) example >>> |
Code that removes dashes from a phone number:
String phoneNumber3 = "977-555-1212"; String phoneNumber4 = ""; for(int i = 0; i < phoneNumber3.length(); i++) { if (phoneNumber3.charAt(i) != '-') { phoneNumber4 += phoneNumber3.charAt(i); } }
<<< String concatenation example | Index | String compareToIgnoreCase( ) example >>> |