You can choose from the following methods:First, using Eclipse, right-click the project to export the jar.Second, using Eclipse, right-click the project to export the runnable jar.Third, use the Eclipse plugin fat jar to export the executable jar
Description of producer and consumer issuesThrough, we can find:Producers and consumers are using the same resource (meat buns)Therefore, when using threads, these two types of locks are also the same lock (in order to avoid thread safety
Worker ThreadHave work to deal with, no job to wait. Equivalent to the cache and consumer portion of the producer consumer, in which the consumer part uses pooling strategies.Applicable environmentThe thread pool.Sample ExampleSlightlyPhase
An enumeration typeSource:public class Enumtest {public static void Main (string[] args) {Size S=size.small;Size T=size.large;S and T refer to the same object?System.out.println (s==t); //is the original data type?System.out.println (S.getclass ().
1. Read the example carefully: Enumtest.java, run it, analyze the running results? What conclusions can you get? Have you mastered the basic usage of enum types? Public classEnumtest { Public Static voidMain (string[] args) {Size s=Size.small; Size
Implementation of Atitit.java eval function Compiler APIOutput Echo 2Output Directory Configuration 2for compilers, The JDK is designed with two interfaces, namely Javacompiler and javacompiler.compilationtask . Private static void T ()
Java step-by-step Tour (ii)--recognize class, reflection concept, Constructor,fiald,method, reflection Main method, array reflection and practice
We continue to talk about Java, this time more interesting, that is reflected
I.
Thread scheduling If our computer has only one CPU, then the CPU can only execute one instruction at a time, and the thread only gets the CPU time slice, that is, the right to use, to execute the instruction.So how does Java make calls to
The process is a program in execution, the program is static (we do not run it after writing to keep it there), the process is the implementation of the program, is a dynamic concept. A process can have multiple threads.Two. Multithreading contains
1. Procedures and Operating resultsEnum types are reference types, where S is not the same object referenced by T, not the original data type, and can be converted from a string.Each of its specific values refers to a specific object. The same value
Requirements: Copying text filesAnalysis:Because the text file we open with Notepad can be read, so use a character stream. There are 5 ways to copy a character stream:First write the Main method1 Public Static voidMain (string[]
Character stream for efficient reading and writing, also provides the corresponding characters buffer stream.Character Buffer stream:A, BufferedWriter: Character buffered output streamB, BufferedReader: character buffered input streamA,
Import java.io.*;Import java.net.*;public class Simpleserver {public static void Main (String args[]) throws Exception {ServerSocket serversocket = new ServerSocket (8000,2); The length of the connection request queue is 2Thread.Sleep (360000);
Example 1: find all combinations of err + numbers packagetest;Importjava.util.regex.Matcher;Importjava.util.regex.Pattern; public classRe { public Static voidmain (string[] Args) {String digitnumstr= "11a11, 22a22, 33a33, 44b44,
1 Java EE IntroductionThere are three versions of the Java platform, namely javase (java Platform, standard Edition), javaee Platform, Enterprise editi On) and javame (Java Platform, Micro edititon). javase formerly known as span style=
Java source code analysis: the Java NIO BufferIn the previous post, we introduced the basic use of channel and buffer in Java NIO, which will look at the internal implementation of buffer from the source point of VIEW.In the Java API documentation,
The difference between the comparator interface and the Comparable Interface
1. Where Comparator and Comparable are the sameThey are all java interfaces and are used to compare the size of custom classes,What is a custom class: for example, public
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