Results 1 to 5 of 5
- 11-29-2010, 12:50 AM #1
Member
- Join Date
- Nov 2010
- Posts
- 22
- Rep Power
- 0
Code runs fine but get compile error
Hi everyone. I am new to Java programming and have a book that I am using to learn the programming. I have created the following class and it runs fine without errors but when I compile the code using Eclipse, it tells me there are errors. Am I missing something in the code? Thank you.
public class MultiplicationTable
{
public static void main(String[] args)
{
System.out.print("\t 0 \t 1 \t 2 \t 3 \t 4 \t 5\t " +
"6 \t 7 \t 8 \t 9");
System.out.println();
for(int x = 0; x<=9; x++)
{
System.out.print(x + "\t ");
for(int y=0; y<=9; y++)
{
System.out.print(x*y + "\t ");
}
System.out.println();
}
}
}
-
- 11-29-2010, 10:54 AM #3
Moderator
- Join Date
- Apr 2009
- Posts
- 10,481
- Rep Power
- 16
How does it run if it doesn't compile?
- 11-29-2010, 10:56 AM #4
Hey BillyB! I just complied your code and it complied perfectly for me. Do you have the In.class extra classpath? Because I think that's the problem tbh. :)
- 11-29-2010, 02:18 PM #5
Member
- Join Date
- Nov 2010
- Posts
- 22
- Rep Power
- 0
Similar Threads
-
JMF works fine with javac BUT same code has problems with NetBeans 6.9.1
By WACman in forum NetBeansReplies: 1Last Post: 11-03-2010, 08:49 AM -
Can not compile code , anyone help me fix it ?
By batista11b5 in forum New To JavaReplies: 3Last Post: 10-22-2010, 02:00 PM -
error while compile code using javac
By suri in forum New To JavaReplies: 3Last Post: 01-20-2010, 09:10 AM -
Code compiles in/runs in IDE but not on UNIX system
By Unclejunebug in forum New To JavaReplies: 7Last Post: 10-08-2009, 08:35 AM -
Code will not compile
By ShotGunRockets in forum New To JavaReplies: 17Last Post: 05-10-2009, 03:31 AM


LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks