课程: Java Object-Oriented Programming
今天就学习课程吧!
今天就开通帐号,24,600 门业界名师课程任您挑!
Exploring a built-in Java class
- [Instructor] Now that we have a good understanding of classes and instances, we'll explore the implementation of a built in Java class. One class we've already seen is the color class. We used it by importing Java dot EWT dot color into our tree class and had color represent the color of our tree trunk. While we could look at the documentation to learn more about the color class, one of my favorite tips is to use an IDE to click into the class. I'm using the IntelliJ IDE to write my Java code but there are many other IDEs that also support this feature. To see the source code of the color class, we can command click into the class and go right to the source. This class has around 1200 lines of code including the comments, but let's take a look around and see what concepts we recognize. The color class has a few static attributes or class attributes. These attributes allow us to easily set a default color for a given variable. Just like we used our trunk color in a previous lesson…
随堂练习,边学边练
下载课堂讲义。学练结合,紧跟进度,轻松巩固知识。
内容
-
-
-
(已锁定)
Using classes as blueprints4 分钟
-
(已锁定)
Building objects with a constructor2 分钟 48 秒
-
(已锁定)
Using concrete instances for application logic4 分钟 32 秒
-
(已锁定)
Understanding the difference between class and instance members4 分钟 54 秒
-
(已锁定)
Exploring a built-in Java class4 分钟 5 秒
-
(已锁定)
Challenge: Build an employee class1 分钟 8 秒
-
(已锁定)
Solution: Build an employee class3 分钟 11 秒
-
(已锁定)
-
-
-
-
-