This site requires JavaScript, please enable it in your browser!
Greenfoot back
2woodsway
2woodsway wrote ...

2011/11/12

Please help, I am having problems with a question and no one on the java post is willing to help

2woodsway 2woodsway

2011/11/12

#
Declare an array named a of   ten  elements of type int and initialize the elements (starting with the first) to the values 10 , 20 , ..., 100 respectively. I tried: array a = {10,20,30,40,50,60,70,80,90,100}; which returned incorrect
bourne bourne

2011/11/12

#
try int a = {10,20,30,40,50,60,70,80,90,100};
2woodsway 2woodsway

2011/11/12

#
Thanks so much, your help is so appreciated!You're the best!!
bourne bourne

2011/11/12

#
No problem. You use the "" when you don't have the values or they are lengthy at the initialization of the array. So, int a = new int; creates a new array of 10 elements as type int. Which later can be filled with values.
2woodsway 2woodsway

2011/11/12

#
Is there a link where I can read more of this? In studying Java, is it more of memorization or is there a foundation of formulas?
kiarocks kiarocks

2011/11/12

#
Here, this should help: Link!
AwesomeNameGuy AwesomeNameGuy

2011/11/12

#
The java tutorials are excellent.
You need to login to post a reply.