【正文】
reated as if their name were the concatenation of the name of their enclosing class, a $, and an integer. The keyword public denotes that a method can be called from code in other classes, or that a class may be used by classes outside the class hierarchy. The class hierarchy is related to the name of the directory in which the .java file is located. The keyword static in front of a method indicates a static method, which is associated only with the class and not with any specific instance of that class. Only static methods can be invoked without a reference to an object. Static methods cannot access any method variables that are not static. The keyword void indicates that the main method does not return any value to the caller. If a Java program is to exit with an error code, it must call () explicitly. The method name main is not a keyword in the Java language. It is simply the name of the method the Java launcher calls to pass control to the program. Java classes that run in managed environments such as applets and Enterprise JavaBean do not use or need a main() method. A java program may contain multiple classes that have main methods, which means that the VM needs to be explicitly told which class to launch from. The main method must accept an array of String objects. By convention, it is referenced as args although any other legal identifier name can be used. Since Java 5, the main method can also use variable arguments, in the form of public static void main(String... args), allowing the main method to be invoked with an arbitrary number of String arguments. The effect of this alternate declaration is semantically identical (the args parameter is still an array of String objects), but allows an alternative syntax for creating and passing the array. The Java launcher launches Java by loading a given class (specified on the mand line or as an attribute in a JAR) and starting its public static void main(String[]) method. Standalone programs must declare this method explicitly. The String[] args parameter is an array of String objects containing any arguments passed to the class. The parameters to main are often passed by means of a mand line. Criticism of Java A number of criticisms have been leveled at Java programming language for various design choices in the language and platform. Such criticisms include the implementation of generics, the handling of unsigned numbers, the implementation of floatingpoint arithmetic, and security vulnerabilities. Class libraries Java Platform and Class libraries diagramJava libraries are the piled bytecodes of source code developed by the JRE implementor to support application development in Java. Examples of these libraries are: The core libraries, which include: Collection libraries that implement data structures such as lists, dictionaries, trees, sets, queues and doubleended queue, or stacks XML Processing (Parsing, Transforming, Validating) libraries Security Internationalization and localization libraries The integration libraries, which allow the application writer to municate with external systems. These libraries include: The Java Database Connectivity (JDBC) API for database access Java Naming and Directory Interface (JNDI) for lookup and discovery RMI and CORBA for distributed application development JMX for managing and monitoring applications User interface libraries, which include: The (heavyweight, or native) Abstract Window Toolkit (AWT), which provides GUI ponents, the means for laying out those ponents and the means for handling events from those ponents The (lightweight) Swing libraries, which are built on AWT but provide (nonnative) implementations of the AWT widgetry APIs for audio capture, processing, and playback A platform dependent implementation of Java Virtual Machine (JVM) that is the means by which the byte codes of the Java libraries and third party applications are executed Pl。s trademark license for usage of the Java brand insists that all implementations be patible. This resulted in a legal dispute with Microsoft after Sun claimed that the Microsoft implementation did not support RMI or JNI and had added platformspecific features of their own. Sun sued in 1997, and in 2020 won a settlement of US$20 million, as well as a court order enforcing the terms of the license from Sun. As a result, Microsoft no longer ships Java with Windows, and in recent versions of Windows, Inter Explorer cannot support Java applets without a thirdparty plugin. Sun, and others, have made available free Java runtime systems for those and other versions of Java is essential to the Java EE strategy, and an even more rigorous validation is required to certify an implementation. This environment enables portable serverside applications, such as Web services, Java Servlets, and Enterprise JavaBeans, as well as with embedded systems based on OSGi, using Embedded Java environments. Through the new GlassFish project, Sun is working to create a fully functional, unified open source implementation of the Java EE also distributes a superset of the JRE called the Java Development Kit (monly known as the JDK), which includes development tools such as the Java piler, Javadoc, Jar, and debugger. Java performance and garbage collectors Programs written in Java have a reputation for being slower and requiring more memory than those written in C. However, Java programs39。s office。當我們傳遞一個對象到 ()的方法時, Hibernate 讀取該對象的變量的狀態(tài),并執(zhí)行必要的查詢。無論是從設(shè)計草案還是從一個遺留數(shù)據(jù)庫開始,開發(fā)人員都可以采用 Hibernate。 Struts 這個名字來源于在建 筑和舊式飛機中使用的支持金屬架。因為這兩種方式不可避免的要把表現(xiàn)與業(yè)務邏輯代碼混合在一起,都給前期開發(fā)與后期維護帶來巨大的復雜度。它最初是Jakarta 項目中的一個子項目,并在 2020 年 3 月成為 ASF 的頂級項目。所有這些全部遵從 Spring 通用事務處理和通用數(shù)據(jù)訪問對象異常等級規(guī)范。內(nèi)建的針對 JTA 和 單個 JDBC 數(shù)據(jù)源的一般化策略,使 Spring 的事務支 持不要求 Java EE 環(huán)境,這與一般的 JTA 或者 EJB CMT 相反。 Java Servlet 是 JSP 的技術(shù)基礎(chǔ),而且大型的