Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

deutsche Version

Classes are one of the most important programming constructs of Java and many other languages. They are the abstract model or blueprint for an object. We can also understand classes as extended data types. Unlike the primitive data types we have already looked at, classes define both variables and functions. Programmers call class variablesĀ attributes, and class functions asĀ methods, but otherwise they work much the same to the variables and functions we already know. But in order to get access to these attributes and methods we need to user dot syntax: a "." must be placed after the object name, followed by the name of the attribute or the method.

...