startsWith and endsWith string methods in java