Java tutorial
//package com.java2s; public class Main { public static String getNameFromNameAddress(String nameAddress) { return nameAddress.substring(0, nameAddress.indexOf(" ")); } }