Hi, im using a String format print. First its in a String method called toString, then i use it in my main method called WriteFromArrayToFile. Last and least i use it in my program called "Pgm3" The code: **toString** //Skriver ut det, t ex från det inlästa aLine public String toString2() { return String.format("%13d\t %4.1f\t %s\t %2d\t %2d\t %s\t", eanKod, aPris, enhet, lagerMgd, bestPkt, varuNamn); } **WriteFromArrayToFile** fut.println(p[f].toString()); **Pgm3** LabMetoder.writeFromArrayToFile(utFil, art, ant); After i do like this i get the error msg: Exception in thread "main" java.util.IllegalFormatConversionException: d != java.lang.String at java.util.Formatter$FormatSpecifier.failConversion(Unknown Source) at java.util.Formatter$FormatSpecifier.printInteger(Unknown Source) at java.util.Formatter$FormatSpecifier.print(Unknown Source) at java.util.Formatter.format(Unknown Source) at java.util.Formatter.format(Unknown Source) at java.lang.String.format(Unknown Source) at Artikel.toString2(Artikel.java:93) at LabMetoder.writeFromArrayToFile(LabMetoder.java:150) at Pgm3.main(Pgm3.java:33) .. And this my method WriteFrom.. public static void writeFromArrayToFile(File filNamn, Artikel[] p, int i) throws IOException { PrintWriter fut = new PrintWriter(new BufferedWriter(new FileWriter(filNamn))); fut.println("Christoffer och Torbjörns Sorterad lista " + LabMetoder.tidsFormat()); fut.println(); fut.println("Eankod aPris Lagermgd Bestpunkt Varunamn"); fut.println(); int f; f = 0; while (f