Java Basic notes First wave ~

Source: Internet
Author: User

First review of Java Basics,

1. scope is actually the range in which this variable can work .

2. sometimes encountered value , in fact, a variable name, do not think too complex.

3.Java local variable, instance variable, class variable (static variable) difference

1, a local variable is a variable in the method of a class;

2. An instance variable class is independent of a variable other than a method, but no static modifier is called an object variable

3. class variables (static variables)

A variable that is independent of the method in a class Static modifiers are also known as statically variable

Pseudo Code Description

public class variable{

Static int allclicks=0;// class variable

String str= "Hello World";// instance variable

public void Method(){

Int i=0;// local variable

}

}

4. The difference between an instance variable and a class variable

Java Basic notes First wave ~

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.