Help with array problem

From: Da Man!! (devdaman_at_hotmail.com)
Date: 08/31/04


Date: Tue, 31 Aug 2004 17:10:22 GMT

Hello,

 I'm new to java, and have been given a small problem to deal with. I think
i have a clue to what the anwser is. What would the following section of
java code display?

int [] theArray = { 1,2,3,4,5};

for (int i = 1; i < 5; i++)
{
    System.out.print(theArray [i] * i + "; ");
}

Thank You

Dev



Relevant Pages

  • Re: GNU Java vs. Sun Java: Whats the difference, what is better?
    ... Java and Javascript. ... "Normal" users don't have a clue what programming languages are, ...
    (Ubuntu)
  • Re: Help with array problem
    ... then you can turn your clue into reality ... > I'm new to java, and have been given a small problem to deal with. ... > i have a clue to what the anwser is. ... Checked by AVG anti-virus system. ...
    (comp.lang.java.help)
  • Re: GNU Java vs. Sun Java: Whats the difference, what is better?
    ... Java and Javascript. ... "Normal" users don't have a clue what programming languages ...
    (Ubuntu)
  • Re: Double troubles
    ... can we come to a conclusion that Java has buggy procedures with ... >>floating point? ... > Here's another clue: what gets printed isn't always equal to the value ...
    (comp.lang.java)
  • Re: Building a linked list
    ... An apology wasn't the point of my comment but rather to provide a clue where some useful information might reside. ... in its "Java" section has excellent advice on getting started with problems, buried amongst all the other excellent advice there. ... That is, do you understand in abstract terms how to do it, so that only Java is the difficulty? ...
    (comp.lang.java.programmer)