In UML how should we show a method which return string array in UML method that looks like this
public String[] delete(int col, int row){}
Is this representation correct?
+delete(col: int; row: int): String[]
That is ok, but ideally you should include the bounds in OCL. e.g.
+delete(col: int, row: int): string[0..*]
This is not an array but a 'bounds' so [0..] is zero to infinite strings. [0..1] Zero or one strings. [1..] 1 to infinite strings.
In this case string is the OCL type not a Java String object, others are Bag, Set etc.