Pozdrav
Evo jedan mali primer sta se desava:
//fajl sabiranje
package operacije;
public class sabiranje{
public static int saberi(int a,int b){
return a+b;
}
}
//fajl glavni
import operacije.*;
public class glavni{
public static void main(String[] args){
System.out.println(sabiranje.saberi(3,3));
}
}
Izbacuje sledecu gresku :
----------------------------------------------------
C:\Program Files\Xinox Software\JCreatorV3\MyProjects\prt\sabiranje.java:3: duplicate class: operacije.sabiranje
public class sabiranje{
^
C:\Program Files\Xinox Software\JCreatorV3\MyProjects\prt\glavni.java:5: cannot access sabiranje
bad class file: C:\Program Files\Xinox Software\JCreatorV3\MyProjects\prt\sabiranje.java
file does not contain class sabiranje
Please remove or make sure it appears in the correct subdirectory of the classpath.
System.out.println(sabiranje.saberi(3,3));
^
2 errors
Process completed.
-----------------------------------------
E a ako promenim "import operacije.*;" u "import operacije.sabiranje;" onda radi.
Stvarno ne znam u cemu je problem,molim vas pomagajte.
Unapred zahvalan.