<<< Java API toString( ) methods | Index | String Concatenation >>> |
Code that parses a first name from a person's name
String fullName = " Pamela Caldwell "; fullName = fullName.trim(); int indexOfSpace = fullName.indexOf( " " ); String firstName = fullName.substring( 0, indexOfSpace );
<<< Java API toString( ) methods | Index | String Concatenation >>> |