I understand a class is a blueprint for creating objects and that objects are instances of a class.
I, also, understand you can create a public Car class by typing: public class Car{
And that...
Type: Posts; User: LyndonS
I understand a class is a blueprint for creating objects and that objects are instances of a class.
I, also, understand you can create a public Car class by typing: public class Car{
And that...
Thank you! Thank you! Thank you! I knew that but had forgotten after going through the while statement that it had never iterated the first time. I was concentrating on the inner while loop so...
Are you telling me when i enters the for loop it is 4 but as soon as it determines 4>=5 it then iterates to 5 - BEFORE performing any other evaluations/actions?
My understanding of how this code should work is as follows:
After i is iterated to 4 at the bottom of the inner while loop, it then evaluates statement 2 of the inner while loop. Since 4<=3 is...
My understanding is for loops work in the following way:
for (statement 1; statement 2; statement 3) {
The code block to be executed would appear here
}
Statement 1 is executed only one...
for (int i=0; i<=5; i++) {
System.out.println("Outer for loop: i = " + i);
i is 4 after it breaks out of the while loop and before it re-enters the above for loop. Since 4 <= 5, I thought...
package myNewTest;
public class MyNewTest {
public static void main(String[] args) {
for (int i=0; i<=5; i++) {
System.out.println("Outer for loop: i = " + i);
while (i<=3) {