public static void main(String args[]) { myMethod(); // i am calling static method from main() }
.
public static ? myMethod(){
Finally i thought my way is better since when number of return types go higher this kind of a implementation do that in best way.
public static ReturningValues myMethod() { ReturningValues rv = new ReturningValues(); rv.setValue("value"); rv.setIndex(12); return rv; }