Computer Forums

Member Login

Remember Me? Sign Up! | Forgot Password
 
Slogan
 
Closed Thread
Old 09-14-2004, 01:39 PM   #1 (permalink)
 
Newb Techie

Join Date: Sep 2004

Posts: 5

Corsica

Default Arrays in Java

Does anyone here know any syntax in Java that will add a double(number type) to the next vacant slot in an array, after the user enters the number. Also, does anyone know how to trim an array to the size of stuff in it.

Any help would be appreciated.
Corsica is offline  
Old 10-01-2004, 08:04 AM   #2 (permalink)
 
True Techie

Join Date: Sep 2004

Posts: 156

ZoneFire

Default

Quote:
Does anyone here know any syntax in Java that will add a double(number type) to the next vacant slot in an array, after the user enters the number.
Do you mean assinging value to one of the slot in the array?
try using a loop and assigned number entered by the user into the particular slot in the array.
__________________
The important thing is not to stop questioning...
Albert Einstein
ZoneFire is offline  
Old 10-18-2004, 11:31 PM   #3 (permalink)
 
Ultra Techie

Join Date: Sep 2003

Location: Bamberg, Germany

Posts: 549

Iron_Cross

Send a message via ICQ to Iron_Cross Send a message via MSN to Iron_Cross Send a message via Yahoo to Iron_Cross
Default

Use an ArrayList it's much more what you're looking for, it's in java.util.*
__________________

See today\'s Penny-Arcade!(May contain foul lanuage)
Pain is weakness leaving the body.

PM Me for my MSN
Iron_Cross is offline  
 
Closed Thread

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On