Multithreaded programming, Java graphical user interface programming, Java I/O systems

Source: Internet
Author: User

Threading Overview

Process: is a "self-containment" running program

Threads are a concept in a process, with minimal processing units

Thread class, Runnable interface, object class

There are two ways to create a new thread of execution: 1: One method is to declare a class as a thread subclass, which is the thread class of the Run method

Start: Adjust Start () method

Write a class that inherits the class, and then override the run () method of the thread class in the class

Write an implementation runnable interface, and then use the instance of the class with Java. Lang. Thread objects are linked together

char can convert int (4 bytes), int casts char (2 bytes);

Class name. Activecount Number of threads

The class name. GetPriority (); Get priority

Thread. Sleep (number of seconds), sleep control

Synchronized: Stepping, is locked in his object

Yield () Method: Stop Running

Notify (); notification wakeup

Java Collection Classes Overview

JCF Framework: He provides the data for managing collections

Set: No order, element cannot be duplicated

List: In order, can be repeated

Add Remove: Delete get: Read data set: Correcting data

Next (); Get method

Generics: Safeguard the security of the collection type;

Size: Gets the collection length

Map interface: unordered

map< type, type > map = new hashmap< type, type > ();

Multithreaded programming, Java graphical user interface programming, Java I/O systems

Contact Us

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

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.