Interrupt and continue are two java keywords. In a loop, such as a loop statement of 50 times, if the break statement is executed in the loop, the whole loop statement will end.
If the continue statement is executed in the loop, the loop ends, that is, the statement after the continue statement in the loop body in the loop is no longer executed, and the next loop is executed.
2. Static keywords
(1) The variable modified by static is a class variable, otherwise it is an instance variable, and the class variable is shared by all objects * * *, that is, the class variables of all objects are allocated to the same memory, and changing the class variables of one object will change the class variables of other objects.
(2) When the 2)java program of (2) is executed, the bytecode file of this class is loaded into the memory. If the class does not create an object, the instance member variables of the class will not be allocated memory. However, when class variables in a class are loaded into memory, the corresponding memory space is allocated. If a class creates an object, the instance variables of different objects are different from each other, that is, different memory spaces are allocated, while the internal variables no longer allocate memory spaces, that is, the class variables of all objects are the same.
(3) When the first object is created, the instance method in the class is assigned the entry address. When the object is created again, the entry address is no longer assigned, that is, the entry address of the method is shared by all objects, and when all objects do not exist, the entry address of the method is cancelled.
3. This keyword
(1) This is a keyword of java, which means object. This can occur in instance methods and constructors, but not in class methods (because non-static variables or methods cannot be called in static methods). When this keyword appears in the constructor, it represents the object created with this constructor. Instance methods must be called through objects. When the this keyword appears in an instance method of a class, it represents the current object calling the method.
(2) Instance methods can manipulate member variables. When an instance member variable appears in an instance method, the default format is as follows. Member variables.
4.final keyword
The final keyword can decorate parameters in classes, member variables and methods.
The final class cannot inherit.
The final method cannot be rewritten, but it can be inherited.
The last member variable must be assigned an initial value and cannot be changed.
The value of the final parameter cannot be changed.
5. Abstract keywords
The abstract keyword can modify classes, variables and methods.
An abstract class can have an abstract method. For abstract methods, only declarations are allowed, not implementations, and abstract methods cannot be decorated with final (because final methods cannot be rewritten).
For abstract classes, you can't use the new operator to create objects of that class. You need to generate its subclasses, which create objects. If a class is a subclass of an abstract class, it must implement the abstract method of the parent class.
6. Super keywords
(1) subclass cannot inherit the constructor of the parent class, so if you want to use the constructor of the parent class, you must use it in the constructor of the subclass, and you must call it with the keyword super, which must be in the first statement of the constructor of the subclass.
(2) If one or more constructors are defined in the class, then java does not provide the default constructor (constructor without parameters). Therefore, when multiple constructors are defined in the parent class, one constructor with no parameters should be included to prevent subclasses from making mistakes when omitting super. You have already evaluated the answer! Good: 0 You have already evaluated it! Bad: 0 You have already evaluated it! Original: 0 You have already evaluated it! Non-original: 0 cello answer adoption rate:10.8% 2010-08-0411.22 report satisfactory answer favorable rate: 0% abstract.
A keyword in Java language, used in class declaration, indicates that a class cannot be instantiated, but can be inherited by other classes. Abstract classes can use abstract methods, which do not need to be implemented, but need to be implemented in subclasses.
break
A Java keyword, used to change the program execution process, immediately starting from the next sentence of the current statement. If there is a label behind it, start execution from the corresponding place of the label.
situation
Keywords of Java language, used to define a set of branch choices. If a value is the same as that given in switch, it will be executed from this branch.
catch
Keyword in Java, used to declare a block that runs when a runtime error or non-runtime exception occurs in a try statement block.
tea
Keywords of Java language, used to define character types.
continue
A Java keyword used to interrupt the current loop process and restart execution from the end of the current loop. If there is a label behind it, it starts from the corresponding position of the label.
do
A keyword in the Java language used to declare a loop. The end condition of this loop can be set by the while keyword.
double;twofold
A keyword of Java language, used to define variables of type double.
other
A keyword of Java language, if the condition of if statement is not met, the statement will be executed.
final
Keywords in Java language. An entity can only be defined once and cannot be changed or inherited later. More strictly speaking, the final modified class cannot be subclassed, the final modified method cannot be rewritten, and the final modified variable cannot change its initial value.
finally
In Java, a keyword used to execute a piece of code, regardless of whether there are exceptions or runtime errors in the previously defined try statement.
flotage
A keyword in the Java language used to define floating-point variables.
for
Java language keywords used to declare loops. Programmers can specify statements to loop, deduce conditions and initialize variables.
if
Keywords of Java programming language, used to generate conditional tests. If the condition is true, the statement under if will be executed.
tool
Keyword of Java(TM) programming language, which is optional in class declaration and is used to indicate the interface implemented by the current class.
Imported?
A keyword of Java(TM) programming language, which indicates a class or the whole package to be referenced later at the beginning of the source file, so that it is unnecessary to add the name of the package when using it.
Example of
Java(TM) keyword with two operands to test whether the runtime type of the first parameter is compatible with the second parameter.
Internationalorganizations (same as international organizations)
A keyword of Java(TM) used to define an integer variable.
A keyword of Java(TM) used to define a series of methods and constants. It can be implemented by the class through the implements keyword.
long
A keyword in the Java language used to define a variable of type long.
private
Keywords in Java language, used in the sound of methods or variables. This means that this method or variable can only be accessed by other elements of this class.
protect
A keyword in Java language, used in the declaration of methods and variables, indicating that this method or variable can only be accessed by elements in the same class, subclass or class in the same package.
public
A keyword in Java language, used in the declaration of methods and variables, indicating that this method or variable can be accessed by elements in other classes.
return
A keyword in Java language used to end the execution of a method. It can be followed by the required value in a method declaration.
short
Keywords of Java language, used to define variables of type short.
static electricity
Keywords of Java language, used to define variables as class variables. A class only maintains a copy of a class variable, no matter how many instances of the class currently exist. Static can also be used to define a method as a class method. Class methods are called by class names rather than concrete instances, and can only manipulate class variables.
this
A keyword in the Java language that represents an instance of the class in which it belongs. This can be used to access class variables and class methods.
throw
Keywords in Java language, allowing users to throw exception objects or any object that implements throwable.
throw
Keywords in Java language are used in the declaration of methods to explain which exceptions are not handled by this method, but submitted to higher layers of the program.
transient
A keyword in the Java language that indicates that the domain is not part of the object serialization. When an object is serialized, the values of transient variables are not included in the serialized representation, but non-transient variables are included.
attempt
A keyword in the Java language that defines a block that may throw an exception statement. If an exception is thrown, the optional catch statement block will handle the exception thrown in the try statement block. At the same time, whether an exception is thrown or not, the finally statement block will be executed.
empty
A keyword in Java language, used in the method declaration of Java language, indicating that the method has no return value. "void" can also be used to represent statements that have no effect.
unstable
A keyword in Java language, used in the declaration of variables, indicating that variables are modified asynchronously by several threads running at the same time.
During ...
A keyword in the Java language, used to define repeated loop statements. The exit condition of the loop is part of the while statement.
About interruption and continuation.
The continue statement is related to the break statement, but it is rarely used. The continue statement is used to make its for, while or do-while statement start the next loop. In the while and do-while statements, the execution of the continue statement means the immediate execution of the test part; In the for loop statement, the execution of the continue statement means that control is passed to the incremental part. The keyword C# in C# (transliterated as "C sharp" or "sharp" in Chinese) is an object-oriented high-level programming language released by Microsoft, which runs in. NET Framework, and plans to appear on the stage of Microsoft Professional Developers Forum (PDC). C# is the latest achievement of Microsoft researcher anders hejlsberg. C# looks strikingly similar to Java. Including single inheritance, interface, almost the same syntax as Java, the process of compiling into intermediate code and then running. However, C# is obviously different from Java. It draws lessons from a feature of Delphi and integrates directly with COM (Component Object Model). It is the protagonist of Microsoft. NET windows network framework. 76 keywords:
Abstract as a basic Boolean delimiter
Check byte case to capture characters
Class constants continue with decimal default values.
Delegate performs double else enumeration.
Event explicit external false final
Foreach goto's fixed floating point
If implicit in the int interface
Inside is the lock length namespace.
New null object operator output
Override parameter private protection public
Read-only reference return byte is sealed.
Short size of stackalloc static string
Struct switch, this will raise true.
Attempt to uncheck the type of uint ulong.
Unsafe ushort using virtual void
During ...
In some cases, five are keywords:
Get setting value Add Delete
There are 76 keywords in C# that have fixed meanings in any case. In some cases, there are also five identifiers with fixed meanings. For example, value can be used as a variable name, but there is one exception, that is, when it is used as a set statement of an attribute/indexer, it is a keyword.
But you can add @ before the keyword so that it can be used as a variable name:
int @ int = 42
But generally do not use this variable name.
You can also use @ to generate strings that span several lines, which is very useful for generating regular expressions. For example:
String pattern = @ "
(# Start grouping
Abra (cad)? # match abra and optional cad
)+"; # One or more occurrences
If you want to include double quotation marks in the string, you can do this:
string quote = @ " " " quote " " & ampq