-------------------- Android training, Java training, and hope to communicate with you! ----------------------
After learning the reflection knowledge, I cannot help but feel that reflection is too powerful,First, we must understand what is the
Today I found a strange problem. A small exception occurred when the service was running well. The calculation result is slightly different from the Expected One.Check the log and find the negativearraysizeexception in the middle.Locate the abnormal
ArticleDirectory
AWT plotting:
Swing plot:
Drawing in Java is divided into AWT drawing and swing drawing. Next we will discuss it one by one: AWT plotting:
The component class provides three plotting-related methods:Paint
Train of Thought: Determine whether the address in the Referer is consistent with the current address. Otherwise, it indicates a cross-origin attack.
/*** Verify the validity of the request and prevent cross-origin attacks ** @ Param Request * @
Aide is a Java ide on Android that supports direct development of Android applications on mobile phones or tablets.
Google Play link:Https://play.google.com/store/apps/details? Id = com. Aide. UI
The following is a custom patch for aide 1.0.1 to 1.
Nine features of jcomponent
1. tooltip function.
You can define a string in the settooltiptext method to help a component.
Button. settooltiptext ("this is a button ");
2. Painting and border functions.
When a swing GUI needs to draw itself, the
SemaphoreYou can maintain the number of threads currently accessed and provide a synchronization mechanism. You can use semaphore to control the number of threads simultaneously accessing resources. For example, you can implement the number of
Use timer, progressbar, and two buttons to create the applet. Click start to Unmount and stop.
The Code is as follows:
----------------------------------------------- The following is the code area ---------------------------------------------------
Before jdk1.5, you can use the synchronized + Set Name of the conllections set tool class, for example, synchronizedset (SET ).
Concurrenthashmap,
Concurrentskiplistmap,
Concurrentskiplistset, concurrent1_queueAnd so on.
1> an endless loop occurs
A good article was written by the author when Java came out 14 years ago. Original Website: http://www.serve.net/buz/hash.adt/java.000.html
With the consent of the author, I translated it into a Chinese author and replied as follows:
"The algorithm
Reflection provides the ability of the program analysis class. Using the Java reflection mechanism, you can easily complete a lot of work. Four classes are commonly used:
Java. Lang. Reflect. Field
Java. Lang. Reflect. Method
Java. Lang. Class
Java.
Any Java application must deal with IO. A fresh understanding of Io is the most basic requirement of Java Programmers. This article mainly introduces Java. i/O design principle, interface, and common input and output classes. Before talking about
Domain objects with ORM metadata are called entities. According to JPA specifications, entities have the following conditions:
You must use the javax. Persistence. entity annotation or have corresponding elements in the XML ing file;
Must have a
Ajax cross-origin access communication proxy also says a lot on the Internet, mostly written in Asp.net or PHPI have never used DWR, and I don't know if there are any instances that implement cross-origin communication. So I wrote this on the
Break label and continue label original link http://blog.sina.com.cn/s/blog_6d5354cd0100xjj1.html in Java
1: BreakThe break statement provides a convenient way to exit the loop. Generally, only one loop is exited.Boolean test = true;Int I =
· Morethanonelogger: normally only one logger is used in each class.
Translate more than one logger: Generally, one logger is only used in one class.
· Loggerisnotstaticfinal: In most cases, the logger can be declared static and final.
Logger
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