Search:

Type: Posts; User: LyndonS

Search: Search took 0.13 seconds.

  1. Replies
    1
    Views
    1,403

    Objects - Are there two types?

    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...
  2. [SOLVED] Re: For loop not executing as expected - Very simple coding

    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...
  3. [SOLVED] Re: For loop not executing as expected - Very simple coding

    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?
  4. [SOLVED] Re: For loop not executing as expected - Very simple coding

    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...
  5. [SOLVED] Re: For loop not executing as expected - Very simple coding

    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...
  6. [SOLVED] Re: For loop not executing as expected - Very simple coding

    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...
  7. [SOLVED] For loop not executing as expected - Very simple coding

    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) {
Results 1 to 7 of 12