Get the App
SLTechnology News&Howtos  ›  Development  › 

What are the common basic grammar knowledge of Java?

Shulou Source: shulou.com Published: 2022-06-03 11:54:27 09月29日 Update

This article mainly explains "what are the common basic grammatical knowledge of Java". Interested friends may wish to have a look. The method introduced in this paper is simple, fast and practical. Next, let the editor take you to learn "what are the common basic grammatical knowledge of Java"?

Object: an object is an instance of a class that has state and behavior.

Class: a class is a template that describes the behavior and state of a class of objects.

Method: a method is a behavior, and a class can have many methods. Logical operations, data modifications, and all actions are done in the method

Variables: there are three main types of variables in Java: local variables, class variables (static variables), and member variables (non-static variables).

Identifiers: class names, variable names, and method names are all called identifiers, and keywords cannot be used as identifiers.

Modifiers: Java can use modifiers to modify methods and properties in a class. There are two main types of modifiers: accessible modifiers default, public, protected, private; inaccessible modifiers final, abstract, strictfp.

Array: an array is an object stored on a heap that can hold multiple variables of the same type.

Keyword: a string (word) given a special meaning by the Java language and used for a special purpose.

Inheritance: in Java, a class can be derived from other classes. If you are creating a class and there is already a class with the properties or methods you need, you can inherit the newly created class.

Interface: in Java, an interface can be understood as a protocol for objects to communicate with each other. Interfaces play an important role in inheritance. The interface defines only the methods to be used by the derivation, but the specific implementation of the method depends entirely on the derived class.

At this point, I believe you have a deeper understanding of "what are the common basic grammar knowledge of Java". You might as well do it in practice. Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!

Tags: Methods variables objects interfaces foundations common knowledge syntax identifiers identifiers behaviors keywords keywords content properties arrays states types static learning Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Shulou Tech Info Docker vpn MySQL Apple