1. The function of the numeric type suffix (for example, the double type uses d and the long type uses l). For this, let's first look at the definition of a variable:
Int I = 2200000000; of course, this will not be compiled because the number has
First, you need to understand the default serialization behavior of Java. Java saves all information about the object. That is to say, in some cases, those that do not need to be saved are also saved. Generally, we only need to save the Logical Data.
When a parent class implements the serializable interface, its sub-classes are automatically serialized.
This is verified as follows:
Package serial;Import java. Io. serializable;Public class superc implements serializable {// The parent
Interfaces in JavaAn interface is a program structure and a special abstract class. All methods in the interface must be public abstract methods, and all attributes in the interface must be public static final ).Declare an InterfaceInterfaceKeyword,
Basic network knowledge Network programming aims to communicate directly or indirectly with other computers through network protocols.The computer network is diverse and complex. Computers on the network must follow certain protocols to communicate
Create a tcp clientTo create a tcp client program:1). Create a socket2). Obtain the I/O Stream3). Read and Write the I/O Stream4). Disable the I/O Stream.5). Disable socket
Socket connection = new Socket(127.0.0.1, 7777); ObjectInputStream input=new
Collection classA collection (Collection class Object) is used to manage several other objects.It is similar to a container in the C ++ standard template library, but it can be used to store various types of objects in Java Collection
Generic Type in java5.0Very practical skills, so let's talk about it separately!DescriptionThis enhances Java's type security. You can check the types of objects in the container during compilation, and do not need to convert the types at runtime.
Generic method definitionWhen copying an array to a set, the array type must be the same as the generic type of the set. Define the generic type, where "... "It is generally replaced by an uppercase letter, that is, the generic name. In fact, the
Thread. currentthread (). isinterrupted () // check whether the current process is in a non-interrupted state
A process is a static concept. Generally speaking, the execution of a process refers to the execution of the main thread in the
The object to be saved is also saved. Generally, we only need to save the Logical Data. You can use the key word transient to mark the data that does not need to be saved.
The following is an example:
Import java. Io .*;
Public class serial
View code
Public Static Void Main (string [] ARGs) Throws Exception { // Createuserrolefield. getinstance (); List = New Arraylist (); Userrolevo u = New Userrolevo (); U. setidcard ( "1"); U. setusername ( "Name1" ); U. setrolename ( "
Download 1.1
:
You can go to the Sun Company website to download the URL: http://java.sun.com.
Note: The Windows version is downloaded.
You can also download Java 2
1. removed the function that can access elements through [] or using pointers in C/C ++ 2. arrays are similar to objects. They are all created using the new keyword. 3. the element type is determined during declaration. 4. you can use the collection
Java embodies a simple programming style everywhere. serialization is one of the most commonly used functions. The design in java is particularly "simple ". With the help of ObjectInputStream and ObjectOutputStream, we can easily implement
In java, the development interface is annoying. Pay attention to the following issues:1. Jframe cannot be placed in JPanel, which is different from iframe in html.2. the dialog in java is not completely controlled, except for the default prompt
Java object-oriented Part 3
Preface
In the previous two sections, we had a similar understanding of object-oriented,
This section is also the end of the Java object-oriented part,
In this section, we will parse the abstract class, interface,
1: Pass the parameter value and reference
A: Value Transfer: basic data type transfer is a value transfer.
B: Reference transfer (Address Transfer): All data types of objects are passed by reference.
2: class variables and member
Java has four internal classes:
1. static inner class: only static member variables and static methods of external classes can be accessed. The method for generating static internal class objects is as follows:
Outerclass. innerclass inner = new
Start learningJ2seThis is the fourth day. For our professional students, this is the second learning.JavaBecause we have this arrangement in our professional courses. However, this video tutorial is quite good compared to the courses taught by
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.