2013年8月2日星期五

Java Foundation Class

 

Java based library to JFC (Java Foundation Class) in the form of the programmer provides a programming interface API, class library in accordance with the purposes vested in a different package.

 

(a) java.lang package
Java packages are most commonly belong to the package, the program does not require injection of this package, you can use the classes in this package, use these classes basic Java program can be designed.
String class provides string concatenation, comparison, character positioning, string printing and other processing methods.
StringBuffer class provides string further processing methods, including substring processing, character add insert, character replacement, etc.
System class provides access to standard input and output devices io read and write methods, including the keyboard, the screen in / out control. Commonly System.out.print (), System.out.println () is a static class variable output stream out the methods provided.
Thread class that provides Java multi-threaded processing methods, including hanging threads, sleep, termination and run and so on.
Math class that provides a lot of mathematical calculations.
Object class, which is a Java class ancestor class for all Java classes provide a method of calling Java garbage collection objects and object-based thread-safe waiting, wake methods.
Throwable class is the Java error, exception class ancestor class for the Java error handling, exception provides methods.

 

(two) java.awt package
classes in this package provides a graphical interface to create methods, including buttons, text boxes, list boxes, containers, fonts, colors and graphics other elements of the building and setting.

 

(three) javax.swing package
This package provides 100% Java graphical interface for creating classes written using the package of the class interface elements can be adjusted to create a variety of operating systems style interface, support for various operating platforms interface development. In addition, swing package also provides tree controls, tab controls, form controls category. Java.swing package java.awt package from many classes are inherited from a class, Java retain the use of the java.awt package in order to maintain technical compatibility, but should try to use the javax.swing package to develop the program interface.

 

(four) java.io package
This package provides the classes the way the system data stream input and output control, file and object to read and write serial processing, more commonly used classes including: BufferInputStream, BufferOutputStream, BufferedReader, BufferedWriter, DataInputStream, DataOutputStream, File, FileReader, FileWriter, FileInputStream and FileOutputStream and so on.

 

(five) java.util package
This package provides the time and date, as well as a list of random numbers, sets, hash tables and stack to create complex data structures such as a class, the more common class has: Date, Timer, Random and LinkedList and so on.

 

(six) java.net package
This package provides support for network development, including the Socket function encapsulates server Serversocket class, the client Socket class, and access the Internet URL class various resources.

 

(seven) java.applet bag
This package is only an Applet class, for the development or embedded on a web page Applet applet, so have a stronger ability to interact with web pages and multimedia, networking capabilities.

没有评论:

发表评论