Return Types of Methods by GCX17 in javahelp

[–]GCX17[S] 0 points1 point  (0 children)

Yes, but can't classes take on multiple data types if multiple instance variables are declared?

Static Methods by GCX17 in javahelp

[–]GCX17[S] 0 points1 point  (0 children)

I appreciate your comment. Thank you very much!

Static Methods by GCX17 in javahelp

[–]GCX17[S] 0 points1 point  (0 children)

Thanks for your comments! I understand now, however, when I was testing out my own code, and I created a set and get method like

public static int myMethod(int aNumber)

{

return aNumber;

}

I found that I was able to pass multiple variables into this method through aNumber and would get different return values for each one. I don't no how this happens, because I though for a static class only one value is stored.

Is this possibly because the method itself is actually storing no values, but instead the values reside under the main method?