Java study notes: bytecode files

Java byte code after compilation produced, is a binary file.

Write a simple Hello.java file:

public class Hello {

    public static void main(String[] args) {
        System.out.println((args.length > 0) ? args[0] : "Hello");

    }

}

In the command line javac Hello.java   to compile the class file for Hello.class file.

Then execute  java Hello  to run the class file (be careful not to add .class).

Which javap  command can be broken down to view the class file

 

End

Guess you like

Origin www.cnblogs.com/colin220/p/10887401.html