An array is an ordered collection of the same type.Characteristics:1. The length of the array cannot be changed once the declaration is specified2. The data types in the array cannot be mixed (the data type of the elements in the array cannot be
Reprint Please specify source: http://blog.csdn.net/like_program/article/details/52986553
What is 1.Logger?In our daily development, there must be a need to deal with log, recall how we use log: first define a static constant Tag,tag value is
1.randomUsed to generate a random numberCase code:/** Random: Used to generate random number * * Use step: * A: Guide Package * Import Java.util.Random * B: Create Object * Rando M r = new Random (); * C: Get random numbers * int number = R.nextint (
Process Control Structure:Branching structureExecutes a piece of code selectively based on branching conditions.IfSwitchThe case statement can be followed only by Byte, short, char, int four integer types, enum type, and Java.lang.String type (from
---the definition of an array---Organization stores a set of data1. A collection of data of the same type--a container is essentially a container--the difference is a container that stores only one data--facing containers, not scattered dataeg. buy
Advantages of the 1.Java languageObject-oriented, platform independent, memory management, security, multi-threading, Java is interpretedThe difference between 2.Java and C + +
Multiple Inheritance (Java interface multiplicity, class not
Array:The most common type of data structure in a programming language is an array of contiguous storage spaces in memory. can be used to store multiple data, each array element holds one data, and the array element is usually accessed through the
I. Overview of Java ExceptionsIn Java, all events can be described by the class, and exceptions in Java are described by the exception class under the Java.lang package.1, Throwable (can throw): The ultimate parent class of the exception class, it
1 Package Cn.bjsxt.array; 2 3 Public class Car {4 String name; 5 // Construction Method 6 Public Car (String name) {7 this. name=name; 8 }9 }1 Package Cn.bjsxt.array;2 /**3 * Array reference type you can be the object.4 *
In the 1.public static void Main () method, static and public can be swapped for positions, can be final decorated, or can be synchronize decorated.When the final-modified variable is not static, you can assign a value at the time of declaration, or
I originally learned Java, because of working reasons to contact C + +. In the C + + contact process, made a lot of mistakes, but still tangled in the grammatical details, it makes me difficult to adapt. At the beginning of the consensus that may be
Read Catalogue
First, Exception introduction
Second, try-catch-finally statement
Iii. Throw and Throws keywords
Four, the exception chain in Java
V. Concluding remarks
Java exception and exception handling back to top
Exception this thing, the program must have, although we are very reluctant to see it, but from another point of view, there are exceptions to the program has a problem, help us to correct in time. Sometimes there are many reasons for the program
First, the abnormal architecture* java.lang.Throwable* |-----error: errors, not processed in program* |-----Exception: Exceptions that require handling of these exceptions when writing a program* |-----Compile-TIME Exception: An exception that
First, the concept of arrays
An array is a combination of multiple identical types of data that enables unified management of these data
The elements in the array can be any data type, including the base data type and the reference data
I. Definition of an exceptionAn exception is an event that causes a program to run at run time because of a programming error or external factor. (It interrupts the normal order flow of the instruction)Ii. Classification of anomalies1.ErrorDynamic
When the program is running, there is a situation outside of expectations, which prevents the program from executing as expected by the programmer, which is an exception.For exceptions, Java provides an excellent workaround: exception handling
Analysis of exception in Java programming and its object-oriented thinking summary [figure]1. Exceptions:Abnormal behavior that occurs in the program.2. The origin of the exception:Program in the process of running the abnormal situation, the
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.