Forums Register Login

Integer[] to a String while setting a text field

+Pie Number of slices to send: Send
Could someone tell me what is wrong?

assuming allStatsArray2 is an Integer[].

I keep getting null values I think.

I did a workaround like this

and it works what am I missing?
+Pie Number of slices to send: Send
Please supply more details. What happens? What happens when you simply print out the array (System.out.println(allStatsArray2) ?
+Pie Number of slices to send: Send
Well, unfortunately I changed all the code before I posted so I will have to take some time to rewrite a sampleClass to post. I just read the faq on how to post, will will give some more effort before I repost.
+Pie Number of slices to send: Send
 

Originally posted by Chadd Franck:
Could someone tell me what is wrong?

assuming allStatsArray2 is an Integer[].


Have you also initialized each element of the array? "new Integer[X]" creates a new array object alright, but all of its elements remain null (or false for boolean, 0 for numbers, \u0000 for char). You need to initialize each one separately.
WHAT is your favorite color? Blue, no yellow, ahhhhhhh! Tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 603 times.
Similar Threads
How to use JSlider to adjust Text in a JPanel
Generating a mandelbrot with Java
Need help with drawing in a JPanel
tortoise and hare race java applet not working properly?
Character reference "&#x0" is an invalid XML character
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 06:00:02.