an HTTP Request tool class used in the work
Package com.qiantu.core.utils;
Import Java.io.File;
Import Java.io.FileInputStream;
Import java.io.IOException;
Import Java.security.KeyStore;
Import java.util.ArrayList;
Import Java.util.HashMap;
Import
1. A simple seasonal enumeration
1. Seasonal enumeration class, no longer inheriting other classes public
enum Seasonenum {
spring,summer,fall,winter;
}
//2.main test
Public Class Testenums {public
static
1, class and object difference, class is an object template, object is a class instance
2, create the syntax of the class class name {}, the class is composed of properties and methods
3, the creation of the syntax of the object:
· Declaring
Stack and queue are two kinds of special linear tables, their logical structure and linear table are the same, but their operation rules are more limited than the linear table, so they call them the linear table with limited operation.
LinkedList
JDBC is the specification of the Java Operational database, which actually defines a set of standard database interfaces that must be implemented in order to implement the database through Java operations, and different database vendors provide
to get annotations on a class
The annotations on the Java fetch class have the following 3 methods: Class.getannotations () gets all the annotations, including their declared and inherited Class.getannotation (class Annotationclass Gets the
Recently need to get information about the field in the database, in this collation, ready for later use (I feel can put these commonly used methods, etc., packaged up, later used on the more convenient)
Java Gets the field name of each field in the
msf4j
Github:https://github.com/wso2/msf4j
MSF4J is a Java lightweight and high-performance WSO2 Micro-service framework.
Sample code:
Application.java public class application { public static Void main (String[] args) { new
Thread Priority
The priority of the thread passes the importance of the thread to the thread scheduler, which tends to allow the highest priority thread to execute first. Then this does not mean that the thread with the lower priority value will
Array stack: Public
class Stack {
private long[] Stackarray;
private int top;
private int maxSize;
Public Stack (int maxSize) {
this.maxsize = maxSize;
top =-1;
Stackarray = new Long[maxsize];
}
public void push (Long value)
the SPI mechanism in Java
1 Introduction of SPI mechanism
The full name of the SPI is the service Provider Interface. Most developers may be unfamiliar because this is for vendors or plug-ins. A more detailed description is available in the
About Java multithreading concurrency control, in addition to the built-in keyword synchronized, there is a Lock,lock implementation class is reetrantlock,lock can achieve more flexible multithreaded concurrency control.
How to use, raise a chestnut
This article compares several common frameworks, hoping to provide you with some references when you encounter export requirements. Common export formats include Word, Excel, and PDFs, which are described in the following three formats.
Word
Word is
One, the list with the head node and the current node two member variables, in the operation can be more convenient. And they're all one-way linked lists with short knots.
package struct;
Import Java.util.Scanner; * * Note: Here's two member
Cause: When Java is installed, the path of the JDK and the path of the JRE are selected as a result of overwriting. At this time you can not find Tools.jar and Dt.jar under LIB. Solution: 1. First uninstall Java, uninstall is very easy, directly to
public class dbcon {// Database-driven object public static final string driver =
"Oracle.jdbc.driver.OracleDriver"; Database connection address (database name) public static final string url = "jdbc:oracle:thin:@
LOCALHOST:1521:ORCL ";
Import Java.util.Scanner;public class Stringbuffertext {Main methodpublic static void Main (string[] args) {br/> @SuppressWarnings ("resource")Scanner sc=new Scanner (system.in);Import of String dataSystem.out.println ("Please enter a
Java concurrency three major propertiesIn the Java memory model, there are three major properties: atomicity , ordering , and visibility .atomicity : Either an operation or multiple operations, or all execution and execution of the process is not
Graphical Condition0. DemoI first give a demo, so that everyone can according to the code I gave, debugging side to see the source. Or that sentence: Pay attention to "my", I renamed the Reentrantlock class for "Myreentrantlock" class, "Lock" 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