Object
Examples of classes (in Layman's words, new things seem to be objects?) The first Scholar's feeling, does not make right and wrong, has the great God to explain to me under can Ah)
Class
class, template, You can give the object instance
Method
behavior, Learn to program, method, this thing in the heart understand, with the front-end words, function it
Instance variable
Each object has a unique instance variable, and the state of the object is determined by the value of these instance Variables.
(example is the object, it is the variable of the Object)
Grammar
Capitalize the first letter of the class name and capitalize the first letter of each word in multiple words
Method first letter lowercase, multiple words except initials other words first letter uppercase
Case sensitivity
All Java programs are executed by the public static void main (String []args) method. (each program has a main method, understand Understanding)
Modifier
- Access control modifiers: default, public, protected, Private
- Non-access control modifiers: final, abstract, strictfp
(know public, private, protected protected, usage and so on need to learn, do not Understand)
Key words
Looks like a lot, oneself looked again, reckoned to remember, put a watch, later nothing to see
Key Words |
Description |
Abstract |
Abstract methods, modifiers for abstract classes |
Assert |
Whether the assertion condition satisfies |
Boolean |
Boolean Data types |
Break |
Jump out of a loop or label code snippet |
Byte |
8-bit Signed data types |
Case |
A condition for a switch statement |
Catch |
Match with try and catch exception information |
Char |
16-bit Unicode character data type |
Class |
Defining classes |
Const |
Not used |
Continue |
Do not execute the remainder of the loop body |
Default |
Default branch in the switch statement |
Do |
Loop statement, The loop body is executed at least once |
Double |
64-bit double-precision floating-point number |
Else |
The branch that executes when the IF condition is not established |
Enum |
Enum type |
Extends |
Represents a class that is a subclass of another class |
Final |
Indicates that a value cannot be changed after initialization Indicates that a method cannot be overridden, or that a class cannot have subclasses |
Finally |
In order to complete the execution of the code design, mainly for the robustness and integrity of the program, regardless of whether there is no exception to execute Code. |
Float |
32-bit single-precision floating-point number |
For |
For Loop statement |
Goto |
Not used |
If |
Conditional statements |
Implements |
Indicates that a class implements an interface |
Import |
Import class |
instanceof |
To test whether an object is an instance of a class |
Int |
32-bit integer number |
Interface |
interface, an abstract type, with only the definition of methods and constants |
Long |
64-bit integer number |
Native |
Represents methods implemented in Non-java code |
New |
Assigning a new class instance |
Package |
A series of related classes make up a package |
Private |
Represents a private field, or method, etc., accessible only from within the class |
Protected |
Indicates that a field can only be accessed through a class or its subclasses Subclasses or other classes within the same package |
Public |
Represents a shared property or method |
Return |
Method return value |
Short |
16-digit number |
Static |
Represents a class-level definition that is shared by all instances of the |
Strictfp |
Floating-point comparisons use strict rules |
Super |
Represents a base class |
Switch |
SELECT statement |
Synchronized |
A block of code that represents a single thread that can be accessed at the same time |
This |
Represents the invocation of the current instance or call another constructor |
Throw |
Throw exception |
Throws |
Defining exceptions that a method might throw |
Transient |
Modify fields that do not serialize |
Try |
Represents a code block to do exception handling or a finally mate to indicate whether throwing an exception executes the code in the finally |
void |
Tag method does not return any values |
Volatile |
Tag fields may be accessed by multiple threads at the same time without synchronizing |
While |
While loop |
Temporarily summed up some conceptual, then add it, after all a little accumulation
Java Learning (ii) Basic concepts, syntax