Polymorphism is one of the three main characteristics of object-oriented1: What is polymorphism: separating interfaces from implementations, making things more of a pattern2: Polymorphic Condition: 1) Inheritance 2) method override 3) There is an
Knowledge Points: 1. Application of Getter and Setter 2. Local variables and member variables (also called global variables) 3.Static keyword usage A. Shared properties of all classes after the member variable is static modified B . After the method
1.Client TerminalImportjava.net.* ;ImportJava.io.* ; Public classClient { Public Static voidMain (string[] args)throwsException {Socket s=NewSocket ("localhost", 8888); //send a message to the serverInputStreamReader r =NewInputStreamReader
The final keyword is similar to const:1 ImportJava.util.*;2 3 Public classFinalData {4 StaticRandom Rand =NewRandom (47);5 Final intValueone = 9;6 Final intI4 = Rand.nextint (20);7 Static Final intInt_5 = Rand.nextint (20);8
Functional requirements: 2048 of the basic interface, to achieve 2048 of the game function.Total ideas: Two classes: Game and Gamelistener.The game is responsible for the implementation of the interface and the overwrite of the paint
Java04switch statements
Format:
Switch () {Case: Constant 1EXECUTE statementBreakDefaultEXECUTE statementBreak}
The case satisfies the execution case execution statement, jumps out of the loop, otherwise executes the default
Disk IO working mechanism1. Standard wayPhysical Disk kernel space user address space2. Direct I/OPhysical Disk user address spaceThe database is so dry, from the same system software point of view, the database is on an equal footing with the
Java provides data types that fall into two main categories: basic data types and reference data types.
basic data types in Java
Name
Size
Range of values
Byte type (bytes)
8bit
-128-127 ( -2^
First, Java exception class introduction.Throwable: There are two important subclasses: Exception (Exception) and error (Errors), both of which are important subclasses of Java exception handling, each of which contains a large number of
Recently, the service-side protocol to be tested for the project was developed using the Java Netty Framework, while the transferred business data was serialized using Google Protobuf and then communicated to the client via TCP traffic. This time
How Java threads are created:1. inherit the thread class to create a threading classInherit the thread class and override the Run method of the class, which represents the task that the thread will complete.2. Creating thread classes through the
1. What is a program counter?The program counter is a small piece of memory that can be seen as the line number indicator of the byte code executed by the current thread.2. What is the function of the program counter?Java implements multi-threading
This article mainly introduces the 5 types of Web servers common in Java, they are Tomcat, Resin, JBoss, WebSphere, WebLogic, the need for friends can refer to the followingA Web server is a container for running and publishing web apps, and only
For a more detailed explanation and code debugging demonstration process, see the videoDeveloping C language compilers in JavaFor a more detailed explanation and code debugging demonstration process, see the videoHow to get into Google, algorithm
1. Demonstrate the exception with a simple example.1. Convert Strings to integersInteger is the encapsulated class of int.Exception in thread "main" Java.lang.NumberFormatException:For input string: "Hello" program exception in Main method, error
The first partInstallation of the JDKConfiguration of the Java_homePATH Configuration BinClasspath configurationPart II650) this.width=650; "Src=" https://s4.51cto.com/wyfs02/M01/9B/1C/wKiom1leEeLwzhZsAAAOQrHly0I456.png-wh_500x0-wm_ 3-wmp_4-s_3628398
Lock as a tool for concurrent shared data, ensuring consistency, there are many implementations in the Java platform (such as synchronized and Reentrantlock, etc.). These locks have been written to provide convenience for our development, but the
Java-ApiDemo, java Enterprise payment apidemo
After playing for a while in the "airplane wars", I will make up the complete code of the airplane wars later.
Continue the course soon
API String related methods:
Note: When intercepting, deleting, or
Eclipse and MyEclipse shortcuts, eclipsemyeclipse
(1) Ctrl + M -- switch the window size(2) Ctrl + Q -- jump to the last editing position(3) F2 -- when you place the cursor on a tag and press F2 to display the Tooltip Description.F3 -- jump to the
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