There are 8 basic data types in Java, such as the following:
Shaping: int, byte,short, long
Float type: float, double
Boolean Type: Boolean
Character type: Char
Table one basic data type
Type
Number of
java io Stream is the input and output stream, the stream is a set of sequential, with the beginning and end of the byte combination, is the general name of the data transmission. That is, the transmission of data between two devices is called a
java-Graphical Interfacea common class Non-container components must be placed on the container component JFrame window container class JPanel panel placed on window non-container classJButton button placed on panel non-container classJTextField
Data entryFirst you need to import a scannerThen declare the scannerOutput input PromptReceive data from user dataOutput data for user dataInstance:ImportJava.util.Scanner;//Import Scanner Public classtest{ Public Static voidMain (string[] args)
Common data types in Java
Data type
Data type Interpretation
Description
Char
Character type
Used to store a single character, such as: Gender "male", "female", Electric Light "on", "off"
One.Two constant separators in file PackageFile;ImportJava.io.File;/** * Two constants * 1, Path delimiter; * 2, name separator \ (Windows)/(Linux, etc.) */@SuppressWarnings("All") Public class Demo01 { Public Static void Main(string[] args)
I. Tools used1.javac2.javaTwo. commandThe project directory is just like thisD:/project/src/com/example/child.javaD:/project/src/com/example/parent.javaD:/project/src/com/example/main.java---Main method entryThis method is suitable for cases with
Java Polymorphism is one of the three main features of object-oriented. (Encapsulation, inheritance, polymorphism), which refers to the specific type of reference variable defined in the program and the method call made by the reference variable are
Given a binary tree, check whether it is a mirror of the itself (ie, symmetric around its center).For example, this binary tree is symmetric: 1 / 2 2/\/3 4 4 3But the following are not: 1 / 2 2 \ 3 3Problem Solving
1. read file contents by byte2. read file contents by character3. Read the contents of the file by line4. Random reading of file contents Public classReadFromFile {/*** Read files in bytes, often used to read binary files, slices, sounds, images,
ArrayListAn array-based implementation is essentially a variable-length array of object references that can dynamically increase or decrease its size.is not thread-safe and can only be used in a single-threaded environment. You can consider using
LinkedListLinkedList is based on a two-way cyclic chain list implementation. It can also be manipulated as a stack, a queue, or a double-ended queue. Non-thread safe. The following directly paste ArrayList Java implementation (only part of the code)
Concurrent programming: A programmatic way to enable multiple tasks to run concurrently.Process: A running program that has its own separate piece of memory space, and the internal data and state of each process are completely independent. You can
==========================================XML file A1234 xx County xx town xx road x section xx No. B1234 xx town xx, Sichuan xx village xx Group What package do you need to find it on the Internet?==========================================1) DOM
The properties of the 1.main method public static can be exchanged, but the return type must be a void type, the formal argument must be of type string[], and the name is variable.2. View the Load class: New HelloWorld (). GetClass ().
Dark Horse programmer _ JavaSE learning summary 11th days _ development tools & APIs common objects 1, _ javase 11th days
------- Android training, java training, and hope to communicate with you! ----------
11.01 introduction to common development
Java high-precision big numeric operationsIn order to solve the problem of overflow and inaccuracy in Calculation of Java basic data types. Java provides two classes: BigInteger and BigDecimal, specifically used for high-precision operations.
Analysis of value transfer and reference transfer in java, analysis of java transfer reference
public class Test { public static void main(String[] args) { String s = new String("aaa"); change(s); System.out.println(s);
Process image and processing file with description Information upload 4 (62), file upload 62
I. process the upload of images and processed files with instructions
void
delete() Delete the files stored in the temporary directory.
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