dynamic array
hello
I'm a dummy in java programming and I need your help on the array.
I would like to keep a text in a text area and put it in a char arrray.
and i would like that the array should have the exact size of the word i kept
actually i was use a static array, but it was not good because the when the word was smaller than the array, it complete the array with \u0000.
i think i need to use dynamic array or pointer but i don't know how to use it (declaration, use...)
thanks for you kind support
Best Regards
[559 byte] By [
Teo73a] at [2007-11-26 17:35:38]

# 1
There is no such thing as a dynamic array in Java. You need to store a static array and replace it when you need the length to change - this is what collections such as ArrayList do behind the scenes.
Though, that aside, I'd be surprised if you need to store a char[] at all. What are you trying to do?
# 3
actually i want to communicate with a GPIB device (power supply, multimeter....)
and i want to use a pseudo langage that i have define.
as for example
PW1 GPIB 5;
PW1 is the name of the power supply and 5 the adress of my GPIB power supply.
and i want to keep this information (PW1 and 5) in a char array.
i use this parameter after, to send dedicated GPIB command.
that why
i would like to have an array which have the size of the world i need (PW1 and5).