Java with base Class library

Source: Internet
Author: User

Java provides programmers with a programming interface API in the form of the base Class library JFC (Java Foundation Class), where classes in class libraries fall into different packages by purpose.

(a) Java.lang bag
Java's most commonly used package belongs to the package, and the program does not need to inject the package, so you can use the classes in the package to design the most basic Java programs.
A string class that provides methods for handling strings, comparisons, character positioning, string printing, and so on.
The StringBuffer class, which provides further processing of strings, including substring processing, character insertion, character substitution, and so on.
The System class provides read and write methods for standard input and output device IO, including keyboard and in/out control of the screen. Common System.out.print (), System.out.println () are the methods provided by the static variable output stream out of the class.
The thread class, which provides Java multithreading methods, including thread suspension, sleep, termination, and run.
Math class, which provides a number of mathematical methods for computing.
The object class, which is the ancestor class of the Java class, provides all Java classes with methods to invoke the Java garbage collection object and an object-based thread-safe wait, wake method, and so on.
The Throwable class, which is the ancestor class for Java errors and exception classes, provides a way for Java to handle errors and exceptions.

(ii) java.awt bag
The classes in this package provide a way to create a graphical interface that includes the creation and setting of elements such as buttons, text boxes, list boxes, containers, fonts, colors, and graphics.

(iii) Javax.swing bag
The package provides a graphical interface creation class written by 100%java, and the interface elements created by the class of the package can be adapted to the interface style of various operating systems and support the development of interface of various operation platforms. In addition, the swing package also provides classes for tree controls, tab controls, and tabular controls. Many of the classes in the Java.swing package inherit from the class of the java.awt package, and Java retains the use of the java.awt package to maintain the compatibility of the technology, but use the javax.swing package as much as possible to develop the program interface.

(iv) Java.io bag
The class of the package provides the data flow mode of the system input and output control, file and object read-write serialization processing, the more commonly used classes include: Bufferinputstream, Bufferoutputstream, BufferedReader, BufferedWriter , DataInputStream, DataOutputStream, File, FileReader, FileWriter, FileInputStream, and FileOutputStream.

(v) java.util bag
The package provides classes for creating complex data structures such as date, random numbers, and lists, collections, hash tables, and stacks, and the more common classes are: date, Timer, random, LinkedList, and so on.

(vi) java.net bag
The package provides support for network development, including the server ServerSocket class that encapsulates socket sockets, the client socket class, and the URL classes that access various resources on the Internet.

(vii) Java.applet bag
This package has only one applet class, which is used to develop or embed applet applets on a Web page, making the Web page more interactive and multimedia and network capable.

Java with base Class library

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.