Draw each frame:
The rest is to draw the image of each frame. In the example above, the applet's repaint () is invoked to draw each frame image.
public void paint(Graphics g) { g.setColor(Color.black); g.drawString("Frame " + frame, 0, 30); }
Who created the thread?
Even if you have never explicitly created a new thread, you may still find yourself using the thread. Threads are introduced into our programs from a variety of sources.
There are many tools that can create threads for you,
In order to master the Network programming step by step, the following research two basic problems in network programming, by solving these two problems will be to the understanding of network programming deep one layer.
1, how to reuse socket
Currently, the Java 2 Platform Enterprise version (EE) architecture is highly respected in both the vendor market and the developer community. As a tool, Extensible Markup Language (XML) simplifies data exchange, interprocess messaging, and thus
This article, an article in IBM Developerworks, describes how to prevent the deserialization of untrusted data input without using encryption and signature techniques. (Last updated in 2013.01.18)
Java serialization allows a developer to save a
Use extensible Verbose Toolkit for garbage collection
Improves application performance, optimizes garbage collection, and discovers application problems
Introduction: Extensible Verbose Toolkit is IBM's new tool, designed to help diagnose and
You can create your own read-only class, and here's a simple example:
: Immutable1.java
//Objects that cannot is modified
//are immune to aliasing.
public class Immutable1 {
private int data;
Public Immutable1 (int initval) {
data =
What is the difference between the mouseclicked () method and the Mousepressed () method in the MouseListener method interface
This is a hot topic, let's go deep to find the answer, the Java ' AWT Library provides two interfaces to listen and
The three major variables of Java are class variables (static variables), instance variables, and local variables (local variables).Local variables are local variables that are used in methods, constructors, or blocks, created when a method,
First, what is abstract method, abstract classAbstract method:1, the background (why should have abstract method): There are some methods, a birth is used to let others inherit the use of rewriting, oneself completely did not go to realize the
1, performance: a ". xml" file with an extension2. Storage: Tree-shaped structure3. XML parsing application:Communication between different applications-booking software and payment softwareCommunication between different platforms--operating
When it comes to stacks, stacks, and constant pools in Java, let's start by looking at the types of data they store.Heap: Store all new objects; Stacks: Stores the basic types of variable data and the application of objects, objects (new objects) do
1. Only the output stream has a print stream: PrintWriter and PrintStream, respectively, provide overloaded print,println methods for the output of multiple data types for characters and bytes. PrintWriter and PrintStream operations do not throw
The foreign gods said: the potential danger of using If statements in programming, foreign if
In most programming languages, if statements have two main functions: verifying input to protect the domain from the impact of wrong data, and processing
Thinking logic of computer programs (67) and thinking 67
The previous section introduced the problem of competing multiple threads to access the same resource and the solution synchronized. we mentioned that in addition to competition among multiple
[In-depth research on Java] 2. JVM class loading mechanism, in-depth research on jvm
1. First, let's take a look at the Code Execution Process:
Ii. significance of research on class loading mechanism
It can be seen that class loading is the first
Common APIs in Hibernate and common APIs in Hibernate1. Configure 1.1 load the core Configuration file,
When loading hibernate. properties: Configuration configuration = new Configuration ();
When hibernate. cfg. xml is loaded: Configuration
Java IO learning notes (5) object stream and io learning notes1. Object stream: directly write or read the Object. 2. serialization: directly convert an Object into a word and write it to a hard disk or network. 3. If you want to convert an object
Java learning notes-inheritance and polymorphism (medium), java learning notes
1. Develop superclass through inheritance)
2. Use the super keyword to evoke the constructor of superclasses
3. overwrite the method in the superclass
4. differentiate
MyBatis course 3 and mybatis Course
Returned auto-increment primary key values:
First, if your database supports automatic generation of primary key fields (such as MySQL)
select last_insert_id() insert into Author ( username, password,
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