Ładny brzuch

w tym programie: /* * Main.java * * Created on 3 czerwiec 2007, 14:45 * * To change this template, choose Tools | Template Manager * and open the template in the editor. */ package javaapplication1; import com.bruceeckel.simpletest.*; /** * * */ public class Main { static Test monitor = new Test(); public static void main(String[] args) { for(int i = 1, j = i + 10; i < 5; i++, j = i * 2) { System.out.println("i= " + i + " j= " + j); } monitor.expect(new String[] { "i= 1 j= 11", "i= 2 j= 4", "i= 3 j= 6", "i= 4 j= 8" }); } }pojawia mi si nastpujcy bd:

init:
deps-jar:
Compiling 30 source files to D:\Karol\inf\nauka prakt\Java\JavaApplication7\build\classes
D:\Karol\inf\nauka prakt\Java\JavaApplication7\src\javaapplication7\com\bruceeckel\simpletest\ OutputVerifier.java:45: compareTo(java.lang.String) in java.lang.String cannot be applied to (java.lang.Object)
((String) out[i]).compareTo(expected[i]) < 0
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
1 error
BUILD FAILED (total time: 0 seconds)

Jest to przykad praktycznie zywcem wziety z Thinking in Java ed. 3
Takze nie iwem dlaczego tak sie dzieje... blad jeszcze pokazuje w bibliotece bruce eckel'a ktora przeciez powinna byc dobra...

Pozdrawiam

  • zanotowane.pl
  • doc.pisz.pl
  • pdf.pisz.pl
  • zsf.htw.pl
  •