Reputation: 3356
I am converting a C++ project into Java. I have one doubt, what is the equivalent of char**
in Java, is it String[]
or String[][]
?
Upvotes: 0
Views: 873
Reputation: 66441
You can't really express the meaning of char**
in Java so there's no equivalent, but if that's actually a pointer to the first element of an array of zero-terminated C-strings, then String[]
is as close as you can get.
If it's a two-dimensional "pseudo-array" of char
, then char[][]
is close enough.
If it's neither but just a pointer to a pointer, then there's no equivalent.
Upvotes: 1
Reputation: 15052
I would say String[] if I remember correctly. String is a handle and that would be an array of handles.
Upvotes: -1