Evening all. I have problem understanding return. I made a simple thing to show what i mean.
Can someone be nice and explain what return does. if im not all lost it return the value 10 to init()?Code:public class test {
public test() {
init();
}
public int init() {
int i = 10;
return i;
}
public static void main(String[] args) {
java.awt.EventQueue.invokeLater(new Runnable(){
public void run(){
new test();
}
}
);
}
}
/ocean
