Java Fundamentals  «Prev  Next»

Lesson 9

Java Language Fundamentals Conclusion

The following list summarizes the important points that were covered in this module:
  1. A source code file may contain, at most, one public class or interface. If a source code file contains a public class or interface, then it must have the same name as the class or interface.
  2. The package statement is used to identify the package associated with the classes and interfaces of a source code file.
  3. The import statement is used to import classes and interfaces from other packages.
  4. A program's main() method has the public and static modifiers and the void return type. It has a single argument of the String[] type which is used to access command line arguments.
  5. Identifiers begin with a Unicode character, underscore, or dollar sign, and are followed by these characters or the digits 0 - 9. Identifiers may not be the literals true, false, null, or any of the 47 reserved keywords.
  6. Java supports the following eight primitive types: boolean, byte, char, short, int, long, float, and double.
  7. Java supports literal values for the primitive types, String type, and objects.
  8. Java automatically initializes field variables and array elements.

Modern Java

Key terms and concepts

  1. Class: A template for the creation of objects.
  2. Interface: A collection of methods that are implemented by classes.
  3. Compilation Unit: A source code file.
  4. Variable: An identifier of a specific type that is used to store a primitive value or reference an object.
  5. Method: A member of a class that allows operations to be performed on objects of that class.
  6. Constructor: A special method that is used to create objects as instances of a class.
  7. Primitive type: One of the following data types: boolean, byte, char, short, int, long, float, and double. Primitive types are collections of values and are not objects.
  8. Object: An instance of a class. A executable unit of code that contains data (field variables) and provides operations for accessing that data (methods).
  9. Constant: A variable whose value is final and cannot be changed.
  10. Signature: The name of the method and the number and types of formal parameters to the method.
  11. Package: A collection of related classes and interfaces that are organized into a separate naming context.
  12. Naming context: A context or scope in which identifiers are unique.
  13. Entry point: The first method that is executed when an application (main()), thread (run()), or applet (init()) is executed.
  14. Modifier: A keyword that is used to modify the definition of a class, variable, method, or constructor.
  15. Unicode: A 16-bit character set that includes ASCII and provides support for international characters.
  16. Field variable: A variable that is a member of a class.
  17. Local variable: A variable whose scope is limited to a code block within a method. Local variables are also referred to as automatic variables.
  18. Automatic variable: A variable whose scope is limited to a code block within a method. Automatic variables are also referred to as local variables.

Java Language - Quiz

Click the Quiz link below to check your understanding of Java language fundamentals.
Note: While taking this quiz, keep in mind that the String concatenation operator (+) converts the null literal to the String "null".
Java Language - Quiz