Graphical User InterfaceJFrame: Creates gui:1 for objects that are windows on the screen. Create frame
JFrame frame = new JFrame ();2. Create Widget
JButton button = new JButton ("click Me");3. Add the widget to the frame
Frame.getcontentpane ().
The Commonutils class has two methods: 1.String uuid (): Generates a random character of length 32, which is usually used to do the ID of an entity class. The base layer uses a UUID class to complete; 2 Tobean (map, class): Converts a Map to a bean
Java1.5 adds new features: Variable parameters: The case where the parameter number is indeterminate and the type is determined, Java treats the variable parameters as an array. Note: The variable parameter must be in the last item. When the number
problem encountered:The error occurred today when the user was using JNI to invoke a DLL encapsulated by a colleagueJava.lang.UnsatisfiedLinkError:no XXX in Java.library.pathThe literal understanding is not loaded into this DLL file.
Problem
Learning Java, the object-oriented language, is essentially about creating classes and instantiating them into objects and calling methods. For beginners Java people always figure out how the object is instantiated, if there is an inheritance
First locate the Jacobversion.properties file in the Jacob.jar Open Meta-inf folder and view the version information for the jar package
Then go online and download the corresponding version of Jacob.dll
Put the downloaded DLL file under the Java
Classes and interfaces, inheritance, and implementation relationships are summarized as follows:
Interface inheritance interface (multiple interfaces can be inherited)
Interfaces cannot inherit, implement classes
class implements interfaces
1. The simplest way:
public static string Reverse1 (String str)
{
return new StringBuffer (str). reverse (). toString ();
}
Using the StringBuffer object
Import java.util.*;
public class main{public
static void Main (string[] args) {
Scanner in =
After the third week of the topic, feel a lot of things do not know, summed up, there are the following:
1.static and public order doesn't matter, just habit;
2. A construction method can be declared private, but it can only be created in this
New Generation Collectors
Serial
Single thread will appear stop the world
Compatible with CMS collectors
Using the replication algorithm
Parnew
Serial version of Multithreading
In addition to serial, only he can cooperate with the CMS
In Java code, the member variables of a class are often placed as private
When you get the value of a private member variable of this class outside of a class, you need to be aware of:
Test class: public class accessibletest { private
You can use:in = new BufferedReader (New InputStreamReader (Socket.getinputstream (), "UTF-8"));out = new BufferedWriter (New OutputStreamWriter (Socket.getoutputstream (), "UTF-8"));Socket Example:
Import java.io.*;
Import java.net.*;
public
The same thread (user) Gets the same object
Package cn.hncu.threadLocalUtil;
Import Java.util.Random;
public class Threadlocalutil {
private static threadlocal t=new threadlocal ();
The following sentence is to demonstrate the use of our
Food, animal, breeder class, Test class. Implements the breeder to feed the animal.Food Class: Property nameAnimal Class: Property name method void EatBreeder Class: Property name method void FeedTest the results of the class printing:John Feed the
These days need to use jersey to overwrite the previous environment SSH jersey version 1.19Use thisservlet> Servlet-name>A-to-REST ServiceServlet-name> Servlet-class>Org.glassfish.jersey.servlet.ServletContainerServlet-class>
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