# Java programming for C C++ developers tutorial **Repository Path**: chiyou-debug/Java-programming-for-C-Cpp-developers-tutorial ## Basic Information - **Project Name**: Java programming for C C++ developers tutorial - **Description**: Java programming for C/C++ developers - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 3 - **Forks**: 1 - **Created**: 2022-03-18 - **Last Updated**: 2024-10-11 ## Categories & Tags **Categories**: Uncategorized **Tags**: java4c, java4cpp ## README # Java programming for C/C++ developers tutorial 面向 C/C++ 开发人员的 Java 编程教程 ## Introduce 介绍 This tutorial uses working code examples to introduce the Java language to C and C++ programmers. 本教程使用工作代码示例向 C 和 C++ 程序员介绍 Java 语言。 ## What is this tutorial about? 本教程是关于什么的? This tutorial introduces the Java programming language to C and C++ developers. Because you already know how to program in C/C++, we'll approach many Java programming concepts by comparison. You will learn a great deal about Java programming by learning how the Java language is similar to, and different from, C and C++. Overall, the purpose of this tutorial is to teach you the fundamental of the Java language and get you programming quickly.
本教程向 C 和 C++ 开发人员介绍 Java 编程语言。因为您已经知道如何使用 C/C++ 进行编程,所以我们将通过比较来处理许多 Java 编程概念。通过学习 Java 语言与 C 和 C++ 的相似之处和不同之处,您将学到很多关于 Java 编程的知识。总的来说,本教程的目的是教您 Java 语言的基础知识并帮助您快速编程。 The creators of the Java programming language borrowed much of its syntax from C and C++. Because of this, many experienced C/C++ programmers are immediately familiar with many aspects of Java code, even if they've never programmed in the language before. This is important because developers with a C/C++ background are able to learn how to program in Java more quickly than beginning programmers or developers coming from other languages.
Java 编程语言的创建者从 C 和 C++ 中借用了它的大部分语法。正因为如此,许多有经验的 C/C++ 程序员会立即熟悉 Java 代码的许多方面,即使他们以前从未使用该语言进行过编程。这很重要,因为具有 C/C++ 背景的开发人员能够比初级程序员或来自其他语言的开发人员更快地学习如何使用 Java 编程。 To make the most of your advantage as a C/C++ programmer, it is important to keep in mind that the differences between the languages are usually more significant than the similarities; failure to recognize this can result in incorrect code. First of all, C/C++ programmers have to be cautious when using the features of the Java language that behave differently from their C/C++ counterparts, such as boolean expressions and default parameter passing by reference instead of passing by value. Second, C/C++ programmers have to learn how to get along without many C/C++ language features on which they have previously relied, such as pointers, global variables, and the preprocessor.
为了充分利用您作为 C/C++ 程序员的优势,重要的是要记住,语言之间的差异通常比相似之处更重要;未能识别这一点可能会导致错误的代码。首先,C/C++ 程序员在使用与 C/C++ 对应物不同的 Java 语言特性时必须谨慎,例如布尔表达式和通过引用传递而不是通过值传递的默认参数。其次,C/C++ 程序员必须学会如何在没有他们以前依赖的许多 C/C++ 语言特性(例如指针、全局变量和预处理器)的情况下相处。