|
所在平台: Udemy |
课程主页: https://www.udemy.com/course/becoming-the-master-of-java/
课程评论:没有评论
**成为Java大师课程总结** 本课程旨在带领学员从Java基础知识深入到字节码,再到更高级的编程主题。成功掌握Java编程将为你学习C++和Python等其他语言打下坚实基础。Java语法设计与C++相似,熟悉C++的学员已掌握一半。Python的面向对象哲学与Java一致。 本课程内容与Oracle官方学习网站dev.java高度同步,提供详细示例解释。课程一大特色是深入剖析字节码,揭示编译器(javac)在实现任务时添加的隐藏代码。例如,现代JDK中,字符串连接会自动转换为StringBuilder对象的append方法调用。理解这些底层机制将帮助你真正精通Java并编写高效代码。 **课程内容概览:** * **第一部分:Java入门**:介绍dev.java网站,讨论`JAVA_HOME` 和 `CLASSPATH` 环境变量。 * **第二部分:原始类型与字面量**:面向初学者,讲解Java支持的原始类型(byte, short, int, long, float, double)及包装类。 * **第三部分:数组**:专注于Java内置数组结构,包括原始类型数组和对象数组,以及数组的初始化。 * **第四部分:局部变量类型自动推断**:介绍Java新版本引入的`var`关键字,实现局部变量类型的自动推断。 * **第五部分:Java运算符**:讲解Java支持的核心运算符,包括数学运算符(+,-,%)及操作符重载。 * **第六部分:表达式与语句**:解释表达式(由运算符和操作数构成)和语句(由一个或多个表达式组成,以分号结尾)的概念。 * **第七部分:控制流语句**:重点介绍`if`、`if-else`、`while`、`for`、`switch`表达式和语句,并分析其字节码。 * **第八部分:面向对象编程导论**:介绍面向对象编程的核心概念,如继承、抽象和接口。讲解Java类默认继承自`java.lang.Object`,并详细讨论包的概念和类型的完全限定名。 * **第九部分:类与对象**:将面向对象概念与Java语法相结合,深入讲解Java在继承、多态、封装方面的特性,以及对象静态与非静态成员的区别。 * **第十部分:类与对象的进阶主题**:进一步探讨Java类与对象的更多高级特性。 * **第十一部分:Java Native Interface (JNI) 导论**:介绍Java开发工具包提供的Foreign Function Interface (FFI),可能涉及C++编程知识。 * **第十二部分:Effective Java 导读**:介绍Java开发者的必读经典《Effective Java》,每讲对应书中的一项最佳实践。 * **第十三部分:杂项**:提供关于Java语言或相关工具的附加见解,如GraalVM的native image和Jupyter notebooks。
This course will take you on a journey of fundamentals of Java all the way through the bytecodes to the more advanced topics of programming. Understanding and mastering Java programming will immediately put you in a good position for learning other languages such as C++ and Python. The syntax of Java was designed to be similar to that of the C++ programs, hence if you are coming from the C++ world, then you are already halfway through mastering the Java language! Similarly, Python operates based on the assumption that every type is represented by an Object, hence closely resembles the philosophy that Java language follows.This course is structured in a way to be very congruent with the official Oracle website for learning Java called dev dot java website. I will walk you through all the items discussed on dev dot java website and give very detailed examples of explanations. One strong feature of this course is the frequent look under the hood in the bytecode of classes. Bytecodes are the compiled code that the java compiler "javac" provides, which sometimes reveal the hidden extra codes that javac adds to accomplish a task. For example, in the most recent version of JDK (java development kit), String concatenation always translates into creating a StringBuilder object behind the scene and calling its "append" method. Understanding such behind the scene concepts will enable you to truly master the Java language and write efficient codes.The topics discussed in this course are:Section 1: Getting Started with JavaIn this section, I introduce the dev dot java website and discuss concepts such as "JAVA_HOME" and "CLASSPATH" environment variables. The concept of CLASSPATH will be discussed in more detail later in section 9 when I discuss the concept of java "packages".Section 2: Primitives and LiteralsThis section is the absolute beginner's introduction to Java language features. Java language supports raw primitives and also provides wrapper classes (also called Boxed primitives). I discuss all of the supported primitives such as byte, short, int, long, float, double.Section 3: ArraysThis section is dedicated to the built-in array construct in java. Java language allows primitive arrays and object arrays. An array can be directly initialized when it is declared. User-defined classes cannot extend built-in arrays.Section 4: Local Variable Type InferenceThis section is a brief introduction to the "var" identifier that was introduced in the recent versions of java. "var" allows the compiler to infer the type of local variables without the need for the developer to intervene. Section 5: Operators in JavaThis section introduces the core concept of operators that the java programming language supports. Math operators such as "addition +", "subtraction -", and "modulus %" are discussed in detail. The important concept of "operator overloading" is also discussed.Section 6: Expressions and StatementsThis section briefly presents a discussion on what constitutes an expression and a statement in java. Expressions are formed from operators and operands. Statements consist of one or more expressions and are always terminated by the semicolon ";".Section 7: Control flow statementsThis is an important section that discusses the control flow statements such as "if", "if else", "while" loop, "for" loop, "switch expression" and "switch statement". The behind the scene bytecode is also reviewed for each control flow construct.Section 8: Intro to Object-Oriented ProgrammingThis section is the introduction to the main concepts of object-oriented programming. Java language was developed with these concepts in mind and relies on the "inheritance", "abstraction", and "interfaces". Every "class" definition in java implicitly inherits from the "Object" class that exists inside the "java.lang" package. The idea of organizing the java project into packages and fully-qualified-name of the types is discussed in great detail.Section 9: Classes and ObjectsThis section puts the general concepts of object-oriented programming in the context of Java programming (syntax) and the unique features that Java provides. We discuss how java handles inheritance, polymorphism, encapsulation, and the difference between the static and non-static states of objects.Section 10: Advanced Topics on Classes and ObjectsThis section dives deeper into the features of classes and objects that Java programming provides. Section 11: Introduction to Java Native InterfaceThis section is an introduction to the foreign function interface (FFI) that the java development kit provides. JNI is considered by some as a difficult topic and is rarely discussed in lectures and courses. This chapter assumes the student has some knowledge of C++ programming and how to compile ".cpp" and ".h" files.Section 12: Introduction to Effective JavaThis section introduces the most important book titled "Effective Java" that every java developer must have. Each lecture corresponds to an item of best practices of java programming that is discussed in the book.Section 13: Miscellaneous TopicsThis section provides additional insights about the java programming language or the tools that are directly or indirectly related to java programming. Tools such as GraalVM's native image and Jupyter notebooks are discussed.