Java supports bitwise operations of integer type data:&: with operations;^: XOR operation;|: or arithmetic;~: Inverse; (unary operator)>>: Arithmetic right shift (consider sign bit, add bit same as sign bit)>>>: Logical right SHIFT operation;are all
First, Java overview 1.1Java language platformFigure 1-1 Java language PlatformNote: Developers are the software that installs the Javase platform.1.2. Cross-platformPlatform: Refers to the operating system (WINDOWS,LINUX,MAC)Cross-platform: Java
Java programs can run on any system that has a Java platform installed, and the syntax is as follows: Java-jar -jar This parameter is necessary, followed by your Java program, for example, our side is
First, heavy and overwrite1) Overloading: Method name is the same, parameter type and number are different, typical is the overloading of the construction methodOverwrite: Method name, Parameter type, return value type all the same, typical is the
PrefaceFactory mode is a relatively common mode of creation. Sometimes. Maybe you used the Factory mode and you didn't know you were using it. At least I feel like the first simple factory model that you are already very familiar with.And it's often
One, running tasks in the threadInsufficient creation of unlimited threads. The thread life cycle is expensive. Resource consumption. StabilitySecond, the executor framework executor based on the producer-consumer model, the operation of submitting
Five, HTMLDefines the document type. defines an HTML document. defines the body of the document. to defines the HTML title. define paragraphs. defines a simple fold line. defines a horizontal line. definition gaze. defines bold text. is not in
One, ObjectThe object class is a superclass of all classes, and all classes inherit directly or indirectly from object1. How to get a byte-code objectGetClass ()Class name.Class.forName2. ToString MethodReturns the address value of an object in
SQL try not to splice precompiled mode/parameterized SQL-----Prevent SQL Injection--sql injection is the execution of a malicious SQL command by inserting a SQL command into a Web form to commit or entering a query string for a domain name or page
Method Oneint c = n;N=m;M=c;TestSystem.out.println ("n=" +n+ "\nm=" +m);Method two with +-do exchangeint x=10,y=5;X=x+y; 5+20Y=x-y; 25-20X=x-y; 25-5System.out.println ("x=" +x+ "\ny=" +y); Three different ways or the highest efficiencyint
Common Naming conventions:Packages: Similar folders for distinguishing the same class names (lowercase)Single-stage: for example:studentMultilevel: For example:cn.studentClass or interface:One word: Capitalize the first letter of the word, for
Int
The int data type is a 32-bit, signed integer represented by twos complement; 3 bytes
The minimum value is-2,147,483,648 ( -2^31);
The maximum value is 2,147,485,647 (2^31-1);
The generic integer variable defaults to the int
First, Java class loading mechanism1. OverviewWhen the class file is loaded by the loader, a meta-information object describing the class structure is formed in the JVM, which can be used to learn the structure information of class, such as
Pre-Preparation: Install IntelliJ idea, download tomcat, download maven (note I use TOMCAT6, maven 3.2.1, jdk1.6.0_45, before maven with 3.5 results error, have a long time, suggest small friends with stable version)IntelliJ Idea official website:
Java language OverviewBasic KnowledgeInteractive modeGraphical interface (graphical User Interface GUI) This method is simple and intuitive, easy to accept and easy to use.command line mode (Command line Interface CLI): You need to have a console,
Packagecom.dobn.bdgcgl.utils; ImportJava.lang.reflect.Field; ImportJava.lang.reflect.Method; Public classclassreflection {/** * @paramClass1 the entity class used to assign values *@paramClass1 the entity class to be assigned *@authorym * @
Public classlianxi{ Public Static voidMain (string[] args) {String str= "A team like a warrior can only seize the opportunity and play three games if the defense is lax, but the jazz still can't find a way to deal with the warrior."; //1. Write code
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