標籤彙整: 電腦課程
Java 101: Class and object initialization in Java
Classes and objects in Java must be initialized before they are used. You’ve previously learned that class fields are initialized to default values when classes are loaded and that objects are initialized via constructors, but there is more to initi… 閱讀全文
Java 101: Polymorphism in Java
Our universe exhibits many examples of entities that can change form: A butterfly morphs from larva to pupa to imago, its adult form. On Earth, the normal state of water is liquid, but water changes to a solid when frozen, and to a gas when heated t… 閱讀全文
Java 101: Polymorphism in Java
Our universe exhibits many examples of entities that can change form: A butterfly morphs from larva to pupa to imago, its adult form. On Earth, the normal state of water is liquid, but water changes to a solid when frozen, and to a gas when heated t… 閱讀全文
Java 101: Inheritance in Java, Part 2
Java provides a standard class library consisting of thousands of classes and other reference types. Despite the disparity in their capabilities, these types form one massive inheritance hierarchy by directly or indirectly extending the Object class… 閱讀全文
Java 101: Inheritance in Java, Part 2
Java provides a standard class library consisting of thousands of classes and other reference types. Despite the disparity in their capabilities, these types form one massive inheritance hierarchy by directly or indirectly extending the Object class… 閱讀全文
Java 101: Inheritance in Java, Part 1
Java supports class reuse through inheritance and composition. In this two-part miniseries we’ll focus on inheritance, one of the fundamental concepts of object-oriented programming. First, you’ll learn how to use the extends keyword to derive a chi… 閱讀全文
Java 101: Inheritance in Java, Part 1
Java supports class reuse through inheritance and composition. In this two-part miniseries we’ll focus on inheritance, one of the fundamental concepts of object-oriented programming. First, you’ll learn how to use the extends keyword to derive a chi… 閱讀全文
Java 101: Classes and objects in Java
Classes, fields, methods, constructors, and objects are the building blocks of object-based Java applications. This article will teach you how to declare classes, describe attributes via fields, describe behaviors via methods, initialize objects via… 閱讀全文
Java 101: Classes and objects in Java
Classes, fields, methods, constructors, and objects are the building blocks of object-based Java applications. This tutorial teaches you how to declare classes, describe attributes via fields, describe behaviors via methods, initialize objects via constructors, and instantiate objects from classes and access their members. Along the way, you’ll also learn about setters and getters, method overloading, setting access levels for fields, constructors, and methods, and more. Note that code examples in this tutorial compile and run under Java 12.
To read this article in full, please click here
(Insider Story) 閱讀全文
Java 101: Deciding and iterating with Java statements
Java applications evaluate expressions in the context of statements, which are standalone islands of code that accomplish various tasks such as declaring a variable, making a decision, or iterating over statements. A statement can be expressed as a … 閱讀全文

