Thorough understanding of the Java expert enter! ! ! ! ! !

Users questions: Java inside, why the main function of variables which must be initialized, while the class inside the variable (attribute) can not (use straightforward language to explain the deep, so that little brother can easily understand, thank you!!!
Experts answer: First District classification variables and local variables. compilers class variable will automatically Initialization, for example int variable value is automatically 0, Stringstr; str automatically null local variables (that simple point, such as the definition of the variables within a method) are not automatically assigned. For example in the main within the definition of inta; at this time a no value, directly will get an error.
  • This information provided by the users.Thanks!