[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 222
  • Last Modified:

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++
0
komlaaa
Asked:
komlaaa
  • 2
1 Solution
 
objectsCommented:
public String[] getArray()
{
   return array;
}
0
 
komlaaaAuthor Commented:
and how do i catch it?
like String array[] = MyObject.getArray(); ?
0
 
objectsCommented:
yes thats right
0

Featured Post

The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now