Decompile software to others by means of the target program (such as executable programs) a "reverse analysis, research" work to derive the idea of other people's software products are used by, principles, structures, algorithms, processes, methods of operation design elements, in certain cases the source may be deduced. Decompiled as reference for their own software, or directly for their own software products. For example, the following code is executed decompile
. 1 public class StringBuffer { 2 public static void main (String [] args) { . 3 the StringBuffer = S new new the StringBuffer ( "the Hello" ); . 4 System.out.println ( "modified string:" ); . 5 Change (S ); . 6 System.out.println (S); . 7 System.out.println ( "after reverse string:" ); . 8 Reverse (S); . 9 System.out.println (S); 10 } . 11 public static void Change (the StringBuffer TEMP) { 12 is temp.append ( "World !!") .insert (0, "MRMr.Song") .Delete (0,2 ); 13 is 14 } 15 public static void Reverse (the StringBuffer TEMP) { 16 temp.reverse (); . 17 } 18 is } . 19 // .append () + corresponding to the string 20 is // iNSERT () with two arguments, the first is the insertion position of the second insertion element or the content 21 is // Delete () has two parameters are deleted start and end positions 22 // Reverse reversed
The results are shown
In the course of the first to switch disks, because they can not cross over the execution, then replace directory with javac .java program execution, with the implementation of java source files, you can see the final result with javap decompile the .class file execution, see sequential method during program execution, is conducive to their own programming, if it is someone else's program, others are more conducive to understand the structure of the program, for their own use