⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 86.txt

📁 是一个 java 基础学习软件 有设计说明
💻 TXT
字号:
Identifiers
 Identifiers are names that we assign to classes, methods, and variables. Java is a case-sensitive language, which means identifiers must have consistent capitalization throughout. Identifiers can have letters and numbers, but a number may not begin the identifier name. Most symbols are not allowed, but the dollar sign ($) and underscore (_) symbols are valid. See also Reference variable.

If statement 
If statements test an expression for a Boolean result. This is achieved by using one or more of Java’s relational operators inside the parenthesis of the statement to compare two or more variables. Also, you can simply use the reserved word true as the expression to force execution of the block of code. See also Decision statement.

Import statement
 Import statements allow us to refer to classes without having to use a fully qualified name for each class. Import statements do not make classes accessible; all classes in the classpath are accessible.

Inheritance
 Inheritance is an object-oriented concept that provides for the reuse and modification of an existing type in such a way that many types can be manipulated as a single type. In Java, inheritance is achieved with the extends keyword.

Inner classes 
Inner classes are a type of class and follow most of the same rules as a normal class. The main difference is an inner class is declared within the curly braces of a class or even within a method. Inner classes are also classes defined at a scope smaller than a package. See also Anonymous inner classes; Local inner classes; Member inner classes; Static inner classes.

InputEvent class
 An InputEvent is an abstract class that serves as the base class for MouseEvent and KeyEvent. InputEvent defines the following method to determine the time of the event.

Instance
 Once the class is instantiated, it becomes an object. A single object is referred to as an “instance” of the class from which it was instantiated.

Instance initializer
 An instance initializer (an alternative to lazy initialization) is a block of code (not a method!) that automatically runs every time you create a new instance of an object. In effect, it is an anonymous constructor. Of course, instance initializers are rather limited; because they do not have arguments, you cannot overload them, so you can have only one of these “constructors” per class.

Instance variable
 An instance variable is declared at object level. Instance variables may be accessed from other methods in the class, or from methods in other classes (depending on the access control). Instance variables may not be accessed from static methods, however, because a static method could be invoked when no instances of the class exist. Logically, if no instances exist, then the instance variable will also not exist, and it would be impossible to access the instance variable.

instanceof comparison operator 
The instanceof comparison operator is available for object variables. The purpose of this operator is to determine whether an object belongs to a given class (or any of the subclasses). This comparison may not be made on primitive types and will result in a compile-time error if it is attempted.

Interface
 An interface defines a group of methods, or a public interface, that must be implemented by any class that implements the interface. An interface allows an object to be treated as a type declared by the interface implemented.

Invocation events
 Invocation events are used to run a piece of code in the AWT event thread using the invoke() and invokeAndWait() methods. This is more of a utility than a part of the AWT event system.

Iterator 
An iterator provides the necessary behavior to get to each element in a collection without exposing the collection itself. In classes containing and manipulating collections, it is good practice to return an iterator instead of the collection containing the elements you want to iterate over. This shields clients from internal changes to the data structures used in your classes.

Java source file 
A file that contains computer instructions written in the Java programming language. A Java source file must meet strict requirements, otherwise the Java compiler will generate errors.

Java Virtual Machine (JVM)
A program that interprets and executes Java byte code and that was generated by a Java compiler. The Java VM provides a variety of resources to the applications it is executing, including memory management, network access, hardware abstraction, and so on. Because it provides a consistent environment for Java applications to run in, the Java VM is the heart of the “write once run anywhere” strategy that has made Java so popular.

Javac
 Javac is the name of the java compiler program. This Java compiler processes the source file to produce a byte code file. 

java.lang package 
The java.lang package defines classes used by all Java programs. The package defines class wrappers for all primitive types such as Boolean, Byte, Character, Double, Float, Integer, Long, Short, and Void as well as Object, the class from which all Java classes inherit.

JVM
 See Java Virtual Machine.

Key pressed events
 Key pressed events occur for keys that do not have an associated character or that must be used in combination with other keys to form a logical character. These are keys such as function keys, up and down arrow keys, and the SHIFT key. The event types for key pressed events are KEY_PRESSED and KEY_RELEASED.

Key typed events 
Key typed events are higher-level than key pressed events, and only occur when a logical sequence or combination that represents a character has been completed. For example, pressing SHIFT-A results in a key typed event with the character A. The event type of a key typed event is KEY_TYPED.

KeyEvent 
A KeyEvent provides the following method that returns a virtual key code constant that represents the key.

Keywords 
Keywords are special reserved words in Java that cannot be used as identifiers for classes, methods, and variables.

Layout managers 
Layout managers are those classes responsible for laying out all components within a container, a process that includes sizing and positioning. A layout manager is associated with a container and a reference to that layout manager is held as a member of the container class. Layout managers are responsible for sizing and positioning components within a container. Layout managers free the developer of having to calculate positions and sizes of each component.

Local inner classes 
You can define inner classes within the scope of a method, or even smaller blocks within a method. We call this a local inner class. This is by far the least used form of inner classes. There are very few cases where you would ever need a named local inner class because most problems can be solved with the other types of inner classes.

Local variable
 A local variable is a variable declared within a method. These are also known as automatic variables. Local variables, including primitives, must be initialized before you attempt to use them (though not necessarily on the same line of code).

Low-level events 
In the AWT, low-level events are finer grained than semantic events and tend to occur at a higher frequency.

Mark phase 
The mark phase of the mark-sweep garbage collection starts with the root objects and looks at all the objects that each root object refers to. If the object is already marked as being in use, then nothing more happens. If not, then the object is marked as in use and all the objects that it refers to are considered. The algorithm repeats until all the objects that can be reached from the root objects have been marked as in use.

Mark-sweep algorithm
 Most Java Virtual Machines (JVMs) implement garbage collection using a variant of the mark-sweep algorithm. This algorithm gets its name from the two passes that it takes over memory. It takes the first pass to mark those objects that are no longer used, and a second pass to remove (sweep) those objects from memory. Mark-sweep starts with the assumption that some objects are always reachable.

Member inner classes 
Inner classes defined in an enclosing class without using the static modifier are called member inner classes. They are members of the enclosing class just like instance variables.

Members 
Elements of a class, including methods and variables.

Method
 A section of source code that performs a specific function, has a name, may be passed parameters and may return a result. Methods are found in classes only.

Method local variables
 See Automatic variables.

Modifier 
A modifier is a keyword in a class, method, or variable declaration that modifies the behavior of the element. See also Access modifier.

Modifier flags
 The modifier flags represent keys (such as SHIFT or ALT) that were pressed at the time of the input event.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -