// Helene Martin, CSE 142 // Breaks apart the name of a music duo of the form name1 & name 2 public class StringDemo { public static void main(String[] args) { // String starz = "Simon & Garfunkel"; String starz = "Yeezy & Hova"; int space = starz.indexOf(" "); // location of FIRST space String kanye = starz.substring(0, space); System.out.println(kanye); String jayz = starz.substring(space + 3); // skip over " & " jayz = jayz.toUpperCase(); // similar to x = x + 1 System.out.println(jayz); } }