When I compile "javac incdem.java" there's the error message
as follows:
cannot read: incdem.java
It can't have anything to do with DOS-path etc. because
other programms compile without error.
I think the JVM doesn't understand the code.
Please help
Thanks.
class incdem
{
public static void main(
String args[]) {
int x;
int y;
x = 1;
x = x++;
System.out.print(x + "\n");
x = 1;
x = ++x;
System.out.print(x + "\n");
x = 1;
x = x--;
System.out.print(x + "\n");
x = 1;
x = --x;
System.out.print(x + "\n");
}
}
=> This code compiles with "cannot read error: incdem.java"
------------------------------------------------------------
class incDe
{
public static void main(String args[]) {
int x;
int y;
x = 1;
x++;
System.out.print(x + "\n");
x = 1;
++x;
System.out.print(x + "\n");
x = 1;
x--;
System.out.print(x + "\n");
x = 1;
--x;
System.out.print(x + "\n");
}
}
This code compiles correctly and results in:
2
2
0
0