Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
class DataHolder {
public int anInt = -1;
public String aString = null;
}
public DataHolder myMethod() {
DataHolder dh = new DataHolder();
dh.anInt = 9;
dh.aString = "Hello";
return dh;
}
DataHolder dataHolder = myMethod();
int i = dataHolder.anInt;
String s = dataHolder.aString;
public class MyReturnValue {
private int value1;
private int value2;
public MyReturnValue(int val1, int val2){
this.value1 = val1;
this.value2 = val2;
}
public int getValue1(){
return value1;
}
public int getValue2(){
return value2;
}
}
Then this would be used :-
public class SomeClass {
public MyReturnValue doSomething(){
//... do some stuff
return new MyReturnValue(1,2);
}
}