This article is selected from: IBM DW Chinese program preparation specification ● exit () exit In addition to being called in main, other places should not be called. Because this does not give any code code opportunities to intercept exit. A similar background service ground program should not be exited because a library module determines to exit. ● Unusually declared errors should throw a runtimeException or derived exception. The top () function of the top layer should intercept all exceptions and print (or record it in the log) on the screen. ● Waste collection Java uses ripe background garbage collection techniques instead of reference count. But this will result in a problem: You must work after the instance of the object is used. For example, a PREL programmer may write: ... {fileoutputstream fos = new fileoutputstream (projectfile); Project.save (FOS, "IDE Project File");} ... unless the output stream is turned off, Problem language for non-reference counts, such as Java, is a clear work that cannot be automatically completed. Writes below: FileOutputStream Fos = New FileOutputStream (ProjectFile); Project.Save (FOS, "Ide Project File"; fos.close (); ● CLONE The following is a useful method: imports Cloneable Public Object Clone ) {THISCLASS OBJ = (thisclass) super.clone (); obj.field1 = (int []) field1.clone (); obj.field2 = field2; returnobj;} catch (clonenotsupportedException E) {throw new interfacerror ("Unexpected ClonyNotsupportedException:" E.GetMessage ());}} ● Final class definitely do not define classes as Final (unless the program framework requirements) due to performance. If a class is not ready to be inherited, it is best to indicate in class documents, not to define it to Final. This is because no one can guarantee that it will not be inherited because of what reason. ● Most of the members variables of the members of the Access class should be defined as protected to prevent inheritance classes from using them. Note, use "int [] packets" instead of "int packets []", the latter is never used. Public void setpackets (int [] packets) {this.packets = packets;} counter} {this.size = size;} Programming Skills BYTE array translation to Characters In order to convert Byte arrays to Characters, you can do this: "Hello World!". GetBytes ();