Java tutorial
//package com.java2s; public class Main { public static String getEANList(String[] eans) { StringBuilder sb = new StringBuilder(); for (int i = 0; i < eans.length; i++) { if (i > 0) sb.append(" "); sb.append(Integer.toString(i + 1) + "/" + eans[i]); } return sb.toString(); } }