Member variables:
Variables defined within the class body are called member variables;
If the variable has a static keyword modifier, it is called a static variable or a class variable;
If the variable does not have a static keyword
function declaration and definition variables :Before you talk about variables, let's talk about the concepts of declaring and defining variables.
Declaring a variable means describing the type of the variable to the compiler,
As a common platform, the JDK itself is also the performance of concurrent programs, and in the JDK do everything possible to provide the concurrency of the system throughput. here, I'll give you a brief introduction to several "lock" optimization
environment variables, or global variables, exist with all the shells, and when you log into the system, you have the corresponding system-defined environment variables. The environment variables of Linux are inherited, that is, the child shell
1, the basic structure of memory in Java:Stack: A reference to a local variable or object;Heap: Something new comes out (object)Method Area: constant pool, etc.Static domain: global variables, etc.The variable will be out of the stack at the end of
A variable defined in a subroutine is called a local variable, and a variable defined at the beginning of the program is called a global variable.The global variable scope is the entire program, and the local variable scope is the subroutine that
Java member variables and instance variables
class variables
Local variables
Instance variable
Local variables
Variables declared in a method body, constructor, or statement block
Created when the method body, constructor, or
Available modifiers for classes, methods, member variables, and local variables
Modifiers
Class
Member Methods
Construction method
Member variable
Local variables
Abstract
Y
Y
_
_
_
FunctionThrough a function, you can define a block of code, which can then be called repeatedly by the function nameDefine a function:DEF alert (): "Print Hello World" print ("Hello World")Using DEF to define a function, the second line suggests a
anonymous functionsIf the function value is used once and the structure statement (which requires a single line of expression), an anonymous function can be used. Benefits of anonymous functions:
The program is used once, so there is no
#知识点一:#在函数外面定义的变量叫全局变量num = 100Def AAA (): ‘‘‘If you modify the global variable directly in the function, an exception is generatedIf you really need to modify it, you can declare it in the function (add global above)‘‘‘Global numPrint
20165336 2016-2017-2 "Java program design" The third week study summary textbook study summary
The class name uses the Latin alphabet so the first letter of the name uses uppercase letters. The first letter of each word should be
Hardware configuration:More than 586 PC compatible machine or brand machine, equipped with color display, mouse, keyboard, memory is not less than 20MB, hardDisk free space not less than 60MB. Recommended configuration for Memory 32MB or 64MB (or
Chapter III Object-oriented (i.)1. (understanding) Object-oriented and process-oriented2. Object-oriented programming focuses on class design1 a project or project, no matter how large, must consist of one class2) class is abstract, like the
A mathematical-defined function and a function in Python
Second, why use a function
Background summary
Three functions and procedures
Four function parameters
Five local variables and global variables
Six forward reference '
Absrtact: In many cases, we need to perform similar processing for each element in the vector (each element +1, or other). In general, we will use a for loop and then process each element. In fact, C + + 11 provides LAMDA expressions, combined with
The Java memory model , called JMM. JMM defines how the Java Virtual Machine (JVM) works in Computer memory (RAM). The JVM is the entire computer virtual model, so JMM is subordinate to the JVM.If we want to learn more about Java concurrency
Fully understand the Java memory modelSeptember 21, 2016 18:39:21
Label:
Memory model/
Volatile/
Concurrent Programming/
Synchronous
46394
The Java memory model , called JMM. JMM defines how the Java
Template class Widget; Uses "class"Template class Widget; Uses "TypeName"Answer: Nothing different. Class and TypeName mean exactly the same thing when you declare a template type parameter (the parameter for the templates). Some programmers prefer
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.