Hello everyone, so I have a question regarding the problem with my code, to the question I have attached below. Could anyone tell me if anything is wrong? So here is my code;
[
would appreciate the feedback.
Welcome to the Java Programming Forums
The professional, friendly Java community. 21,500 members and growing!
The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.
>> REGISTER NOW TO START POSTING
Members have full access to the forums. Advertisements are removed for registered users.
Hello everyone, so I have a question regarding the problem with my code, to the question I have attached below. Could anyone tell me if anything is wrong? So here is my code;
[
would appreciate the feedback.
Last edited by GalaxySIV; April 13th, 2014 at 10:02 AM.
Please explain why you think there might be anything wrong. Copy the program's output and paste it here with comments about what you think the problem is.tell me if anything is wrong
If you have questions please post them here, not a link.
One problem I see is that there are lots of for statements the do NOT have {}s to enclose the code in the for block. That will put a bug into the program the first time code is added to any of those for statements.
If you don't understand my answer, don't ignore it, ask a question.
Why do you say: tell me if anything is wrong?
If you don't understand my answer, don't ignore it, ask a question.
Because I do not have any reference paper where I can compare my answer with, and also I think there might have been some error in the if (gameLevel == 2) stage, because I feel there are too many conflicting if and nested ifs. Im not entirely sure if it is wrong or correct, which is why I posted to see if more experienced members could highlight the error in my code.
And you told me that it would put a bug in to my code because of the absence of {}s, so I tried to compile it, and there seems to be no error. However just because there are no compilation errors does not mean there doesn't exist a logic error?
I'm not sure what you are asking. If you don't have any idea if the code is doing what you want or not, what can anyone suggest?
Make a small, complete program that compiles, executes and shows some error, describe the error and show what you want the program to output.
If you don't understand my answer, don't ignore it, ask a question.
nevermind