Code:public class returntest{ public static void main(String[] args){ test t = test.returnme(); System.out.println(t.teststring); } } class test{ String teststring = "Hello"; public static test returnme(){return new test();} }
|
Results 1 to 20 of 20
Thread: static methodThreaded View
|
Click Here to Expand Forum to Full Width |