public class Kata { public static String createPhoneNumber(int[] numbers) { public int Int_to_str(int i) { return Integer.toString(numbers[i]); } return "(" + Int_to_str(0) + Int_to_str(1) + Int_to_str(2) + ") " + Int_to_str(3) + Int_to_str(4) + Int_to_str(5) + "-" + Int_to_str(6) + Int_to_str(7) + Int_to_str(8) + Int_to_str(9); } } Returns an error:
public int Int_to_str(int i){ ^ /Kata.java:3: error: ';' expected public int Int_to_str(int i){ ^ /Kata.java:3: error: ';' expected public int Int_to_str(int i){