java foundation

  • java cross-platform principle
    java programs are not directly running, the Java compiler compiles the Java source program into the platform-independent bytecode file (Class file), and then interpret the bytecode file by the Java Virtual Machine (JVM).So under different operating systems, just install different Java virtual machines to implement a cross-platform for Java programs.
    image

  • JDK
    image
    image

image
image

  • The source program passedjavacxxx.java file then build the generated xxx.class bytecode file, then passjavaxxx runs the entire xxx.java file
    image

  • Shortcut keyimage

  • Small to large range is implicit type conversion, large to small needs to explicit (mandatory) type conversion

  • idea project structureimage