I wrote a program:
public class averfruit
{
public static void main(
String[] args)
{
int orange=50;
int apple=20;
int average=0;
average = (orange + apple) / 2;
System.out.println("Average no. of
fruit is : " + average);
}
}
I tried the full path to compile it with jdk1.3 and j2sdk1.4.
Both incurred the same errors:
averfruit.java:11: illegal character: \0
int apple = 20;
100 errors
I also tried to run it on win2k and win98 platforms, same errors.
However, I can compile this program by JBuilder5.
So, what's wrong with my code, the jdk or my OS?
Thanks
Andrew