return a pointer to an array of strings

Hi Experts,

let  private String array[] = { "a", "b", "c"} a data member of my class.
is there anyway i can use an accessor method like getArray( )  that can return a point to that array.
something like:

I know this can be done in C++
komlaaaAsked:
Who is Participating?
 
objectsCommented:
yes thats right
0
 
objectsCommented:
public String[] getArray()
{
   return array;
}
0
 
komlaaaAuthor Commented:
and how do i catch it?
like String array[] = MyObject.getArray(); ?
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.