Need help
Hey folks.
I am quite new to Java programing. I would need some assistance, when compiling a program on NetBeans. When I do - it shows up an error:
build.xml:7: Cannot find nbproject/build-impl.xml imported from C:\
Any idea what it could be?
Even if I try to compile it with a custom-made .BAT file (what are BAT files anyway) which I saw on YouTube, the prompt said that there were no such commands as javac.
Also, when it comes to loops. For me, this is a bit confusing.
If I have 3 loops in a row, which one will execute first?
For example
if (statement) {
if (statement) {
if (statement) {
}
}
}
I would appriciate any assistance. :)
Best wishes.
Could you please help me?
hi not sure about your Netbeans issue but as for the second part...
Those are not loops but conditional statements and the first one would execute first. If that statement evaluated to true it would go on to evaluate the second and so on.
If you had 3 nested loops it would also begin execution at the outermost loop.
for (String x: values) // begin first iteration
{
for (String y: yValues)
{
for (String z: zValues)
{
}
}
}
but it would complete the innermost loop first (z) before moving back to the next (y) until it reached the outermost again and moved onto the next iteration (if any) You can also break out of loops by using break statements to stop the flow. Have a look at the java tutorial:
http://java.sun.com/docs/books/tutorial/index.html