bbvic
asked on
array
String [] test ="";
String test1="test1";
String test2="test2";
String test3="test3";
test = {test1,test2,test3};
is it correct?
String test1="test1";
String test2="test2";
String test3="test3";
test = {test1,test2,test3};
is it correct?
ASKER CERTIFIED SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
declare it like this
String[] flintstones = {"Fred", "Wilma", "Pebbles"};
test1 would be a pointer of type string that points to the memory location where t is stored, you would have to do a strcpy to fill the array and you would need to use free to allocate some memory to store the array.
or am i talking in C !!