Hi Above,
Try to check your code. I guess you missed out the closing brabes for public static void main. I have modified the code as,
It gives me the O/P,
run-single:
j=3
jj=4
3
BUILD SUCCESSFUL (total time: 0 seconds)
I don't understand why it is not printing out the vakues for i and k from the out method???
Lakshmi as per your quote,
I think,in interface the variables must be initialized at thier declaration.But here the code is containing method calls
I also have the same doubt as in interface all variables are implicitly public static final. So in the above code, the call ii = Main.out("ii", 2) assigns ii the vakue of 2 only after the method returns the value. So why does this not produce any compile time errors??
Anyone please explain?
Regards,
Jothi Shankar Kumar. S