[Java] Beginner's experience - - Why is variables that cannot be used

xiaoxiao2021-03-06  42

I tried it yesterday.

Public Class Temp

{

Public string s = "hello";

Public static void main (string [] args)

System.out.println (s);

}

Why can't you always do it, check a lot of information (....) Discover that the original Java is loaded, then loads the contents of Static, then loads the other, so the variables are still not declared when printing, thus an error.

Oh, the initiator will often make mistakes.

转载请注明原文地址:https://www.9cbs.com/read-71262.html

New Post(0)