First, the basic knowledgeAssert can be used in Java to create assertions that assert that a condition should be true during the execution of a program. If the condition is false, a Assertionerror exception is thrown. Assertions are closed by
First, the basic knowledgeEnumeration constants are public static members of enumerated types, and their types are enumerated types that declare them. These constants are called self-typed. Because it is a static constant, you can use the relational
Variable
Variable: A piece of storage space in memory that is the basic unit for storing data.
Use: Declare first, then assign value, in use.
Declaration: Data type + variable name = value. (example: int a = 5;)
Data
Each site has its own statistical access, but the server will have unexpected circumstances, such as power outages. )So we need to save this data in the time before the site hangs up.We need to use the largest container of the site, application, we
Original usage Public enum Color { RED, GREEN, BLANK, YELLOW } Usage in development Public enumapicodeenum {SUCCESS (0, "OK"), User_not_exists (1, "The user does not exist!" "), Code_error (2, "The verification code is not correct!" "),
CLI package with command to build a jar package with parameter hintsNeed to introduce the command CLI dependency1.2 commons-cli commons-cli ${commons.version} Package
First, the Java Foundation-serializable serialization solves what problem1, Java object to achieve data persistence through IO stream, or read and write to the hard disk must be serialized, if not serialized will throw
Java object-oriented has 4 characteristics:1 abstractionExtracts the generality of an object, constituting an abstract class or interface, overriding an abstract method by an implementation class that inherits the class or interface of an abstract
1. Follow the principle of single responsibilityA class only focuses on doing one thing;Cohesion poly, low coupling;2. Open-Close principleOpen to the expansion, the modification is closed (as far as possible to expand the original code);Cohesion
The static keyword in Java is meant to be used primarily for the following three points, static member variables, static member methods, and static blocks. In a class, if an object (variable or method) with a static type is defined, the object is
Member access Permissions in JavaThere are four access control characters in Java:Scope _____ Current class ____ Same package___ descendant class ____ Other packagePublic______√___________√__________√___________√Protected___√___________√__________√__
The birth of a garbage collector (garbage Collection, GC) led to three questions:What memory needs to be recycled?When do I recycle?How to recycle?The three regions (program counters, virtual machine stacks, local method stacks) that are exclusive
Before starting the Java basic syntax, explain the basic specifications of the Java program:
Case sensitive, such as person and person are different
The first letter of the class name is capitalized, and if the class name consists of
Java provides 8 basic data types, including 6 types of numbers (4 whole, 2 floating point), one character type, one Boolean4 whole includes:Byte:8 bit -2^7--2^7-1 default value is 0Short:16 bit -2^15--2^ (16-1)-1 default value is 0INT:32 bit -2^31--2
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