Java 编程基础知识

原文:https://www.geeksforgeeks.org/java-programming-basics/

Java 是最流行、应用最广泛的编程语言和平台之一。平台是一种有助于开发和运行用任何编程语言编写的程序的环境。 Java 快速、可靠、安全。从桌面到网络应用,从科学超级计算机到游戏机,从手机到互联网,Java 被应用到每一个角落。

然而,要精通任何编程语言,首先需要了解该语言的基础知识。

因此,以下是 Java 的基础知识,其格式将最大程度地帮助您获得领先优势:

  1. Java Environment: The programming environment of Java consists of three components mainly:

    在这里了解设置 Java 环境:在 Java 中设置环境T3

  2. Java Basic Syntax: Every programming language has its own set of rules to declare, define and work on its components. Reading and learning about all of them together is difficult. Therefore here is a simple task of printing “Hello World” in Java. During this process, major components and their syntaxes are explained clearly.

    在此了解用 Java 打印“Hello World”的方法:用 Hello World 示例开始 Java 编程

  3. Comments in Java: In a program, comments take part in making the program become more human-readable by placing the detail of code involved and proper use of comments makes maintenance easier and finding bugs easily. Comments are ignored by the compiler while compiling the code.

    在此了解 Java 中的注释:Java 中的注释

  4. Data Types in Java: Each variable in Java has an associated data type. Each data type requires different amounts of memory and has some specific operations which can be performed over it.

    在这里了解 Java 中不同的数据类型:Java 中的数据类型

  5. Variables in Java: A variable is the name given to a memory location. It is the basic unit of storage in a program.

    在此了解 Java 中的变量:Java 中的变量 T4】

  6. Keywords in Java: Keywords or Reserved words are the words in a language that are used for some internal process or represent some predefined actions. These words are therefore not allowed to use as variable names or objects. Doing this will result in a compile-time error.

    在此了解 Java 中的关键词:Java 中的关键词 T4】

  7. Operators in Java: Operators are the foundation of any programming language. Thus the functionality of Java programming language is incomplete without the use of operators. We can define operators as symbols that help us to perform specific mathematical and logical computations on operands. In other words, we can say that an operator operates the operands.

    在此了解 Java 中的运算符:Java 中的运算符 T4】

  8. Decision Making (Control Statements) in Java: Decision Making in programming is similar to decision making in real life. In programming also we face some situations where we want a certain block of code to be executed when some condition is fulfilled. A programming language uses control statements to control the flow of execution of the program based on certain conditions. These are used to cause the flow of execution to advance and branch based on changes to the state of a program.

    在此了解 Java 的决策制定:Java 的决策制定 T4】

  9. Loops in Java: Looping in programming languages is a feature which facilitates the execution of a set of instructions/functions repeatedly while some condition evaluates to true. Java provides three ways for executing the loops. While all the ways provide similar basic functionality, they differ in their syntax and condition checking time.

    在此了解 Java 中的循环:Java 中的循环