Home >Java >javaTutorial >What are java advanced features
Java advanced features mainly include collection framework and generics, utility classes, input and output processing, annotations and multi-threading, network programming and XML technology.
Collection framework
is a set of interfaces and classes (located in the java.util package) with excellent performance and easy use to solve Arrays cannot adapt well to dynamic changes in the number of elements in storage, and have low search efficiency defects
Collection interface: Map, Collection (sub-interface List, Set), Iterator
Interface implementation class: HashMap TreeMap, ArrayList LinkedList, HashSet TreeSet implements map, list, and set interfaces
Collection tool classes: Arrays, Collections Provide algorithms for operating on collection elements
Generic collection
Generics are parameterized types, which implement constraints by specifying the element type in the collection
Function: Use the type of the object as a parameter and specify it to other classes or methods to ensure type conversion Security and stability
Utility class
Java API: Java application programming interface, Java help documentation
Utility class: By Java Common classes provided by API
Be sure to read more about Java API when learning this part.
Input/output and reflection
Commonly used base classes for IO streams
Note: () Inside are subclasses such as File **Class, Buffered** class
Buffered** class has a buffer and a readLine() method that reads content line by line
Byte stream
Byte input stream: InputStream (FileInputStream, BufferedInputStream)
Byte output stream: OutputStream (FileOutputStream, BufferedOutStream)
Character stream
Character input stream: Reader (FileReader, BufferedReader)
Character output stream: Writer (FileWriter, BufferedWriter)
Java Reflection
Reflection : Refers to the fact that a Java program can be self-describing and self-controlling. It allows the program to load, detect, and use classes that are completely unknown during compilation when it is running.
Reflection mechanism: refers to dynamically obtaining class information and dynamically obtaining class information in the running state. Function of calling object method
Annotation
Special mark in Java code. It provides a formal method for adding additional information to the code that cannot be expressed in a Java program. Annotations can be regarded as modifiers, modifying program elements.
Annotations can be read during compilation, class loading, and runtime. Comments will not be read by the program.
Thread Scheduling
Multiple threads are in the runnable state, and thread scheduling will determine the order in which threads enter the runnable state based on priority.
The priority of the thread is expressed from 1 to 10, 10 has the highest priority, and the default value is 5
Network Programming Technology
Network: Yes A virtual platform for information transmission, reception, and sharing that connects information from various points, surfaces, and entities to achieve resource sharing
Network programming: Programming that uses sockets to achieve inter-process communication purposes
Introduction to XML
XML (Extensibel Markup Language): Extensible Markup Language is a simple data storage language that uses a series of simple tags to describe data.
Features: Independent of operating system and development platform; standardized and unified
Function: data interaction; configuration of applications and websites; cornerstone of Ajax
The above is the detailed content of What are java advanced features. For more information, please follow other related articles on the PHP Chinese website!