hi, im new to java.
regarding string array, is there a way to do string index.??
example:
String[] arr = null;
arr["name"]="myname";
arr["age"]="myage";
arr["gender"]="mygender";
The reason to my question is because im creating a class user. the variables will be private. i would need to get and set these variables, therefore creating a set of get() and set() function for each variable. If i can do the above method, i would simply need one set of get() and set() function where i can pass in parameters.
hope thats not too confusing.
Thanks.