GoConqr hat ein neues Design! Sag uns, wie es dir gefällt.

Mindmap

Java Building Blocks

Ericka Montero Computación e Informática Spanisch

Java Building Blocks

Inhalt der Mindmap

Java Building Blocks

  1. Java Class Structure

    • Fields and Methods
      • fields, more generally known as variable
      • methods, often called functions or procedures
      • Variables hold the state of the program, and methods operate on that state
    • Comments
      • single-line comment
      • A multiple-line comment
      • Javadoc comment
  2. Writing a main() Method

    • A main() method is the gateway between the startup of a Java process, which is managed by the Java Virtual Machine (JVM), and the beginning of the programmer’s cod
    • Rules
      • The method must be marked as a public method.
      • The method must be marked as a static method
      • The name of the method must be main
      • The return type of this method must be void.
      • The method must accept a method argument of a String array or a variable argument (varargs) of type String
  3. Understanding Package Declarations and Imports

    • . Java puts classes in packages. These are logical groupings for classes.
    • Java classes are grouped into packages
    • RULES TO REMEMBER
      • Here are a few of important rules about packages: ■ Per Java naming conventions, package names should all be in lowercase. ■ The package and subpackage names are separated using a dot (.). ■ Package names follow the rules defined for valid identifiers in Java. ■ For classes and interfaces defined in a package, the package statement is the first statement in a Java source file (a .java file). The exception is that comments can appear before or after a package statement. ■ There can be a maximum of one package statement per Java source code file (.java file). ■ All the classes and interfaces defined in a Java source code file are defined in the same package. They can’t be defined in separate packages
    • Wildcards
      • The * is a wildcard that matches all classes in the package
    • Redundant Imports
    • Naming Conflicts
      • This means you’ll sometimes want to import a class that can be found in multiple places

Bilder und Dateien der Mindmap

  • Java Building Blocks

Informationen

Beschreibung
Computación e Informática Mindmap am Java Building Blocks, erstellt von Ericka Montero am 11/03/2020.
Erstellt von
Ericka Montero
Aufrufe
0
Bewertung

Feedback

Worum geht es?

Wie gefällt dir das neue Design?

Dein Eindruck