First knowledge of Java and basic usage

  • Java

    With the development of Java, SUN has divided Java into three different versions:

    • Java SE: Standard Edition
    • Java EE: Enterprise Edition
    • Java ME: Micro Edition

    Recommended learning route:

    1. Java SE , master Java language itself, Java core development technology, Java standard library
    2. If you continue to learn Java EE , Spring framework, database development, and distributed framework are all you need to learn
    3. If you want to learn big data development, then big data platforms such as Hadoop, Spark, Flink need to be learned, they are all based on Java or Scala development
    4. If you want to learn mobile development, then go deep into the Android platform and master Android App development

    JDK: Java Development Kit

    JRE: Java Runtime Environment

    JSR: Java Specification Request

    JCP: Java Community Process

  • Basic principles

    Object-Oriented Programming

    A Java source code can only define one publictype class, and the classname and file name must be exactly the same;

    Use javacmay .javacompile source code into .classbyte code;

    Use javacan run a compiled Java program , the parameter is the class name;

    The method specified by the Java entry program must be a static method, the method name must be main, and the parameter in the brackets must be a String array ;

    This 变量, Used inside the method, always point to the current instance.

    Javaextends implements inheritance through keywords extends. For classes that are not explicitly written , the compiler will automatically add them extends Object. In OOP terms,

    • Person称为super class, parent class, base class
    • Student is called subclass, extended class

    In the inheritance relationship, if the subclass defines a method with the same signature as the parent class method, it is called replicationOverride .

    Polymorphism means that for a certain type of method call, the method actually executed depends on the actual type of method at runtime.

    packageIt is a name space defined by Java . A class always belongs to a certain package, the class name is just a shorthand, the real class name is package.class_name.

    .classThe file is the smallest executable file seen by the JVM , and a large program needs to write many classes. And generate a bunch of .classfiles, which is very inconvenient to manage. jarFiles are containers for class files. jarIt is just a container for storing classes, and it does not care about dependencies between classes. Modules are .jmodidentified by extensions.

  • References

  1. Liao Xuefeng's official website
  2. The Java Totorial from Oracle
  3. TutorialPoint : Java Tutorial
  4. Java Point
  5. BeginnersBook : Java tutorial - Learn Java Programming wiht examples

Guess you like

Origin blog.csdn.net/The_Time_Runner/article/details/113001234