[Solved] What does it mean by Object [ ] [closed]


your generateNewGreedySolution method returns an array of Object Type

In the 5th line you are doing

Object[] values = new Object[ins.getDimension()];

So here values is an object array and hence you are returing the same.

If you are confused of what to return in methods then please note that if your method signaure is int then you should return int,if your method signature is String then you should return String.

Here your method return type is Object[] and so you are returning values

3

solved What does it mean by Object [ ] [closed]