课程: Java Essential Training: Syntax and Structure
今天就学习课程吧!
今天就开通帐号,24,700 门业界名师课程任您挑!
Classes
- [Instructor] Packages contain Java files, also known as classes. Let's create a new class. Right-click on the package, select New and choose Java Class. By convention, Java classes start with an uppercase letter. We're going to make a class that will implement a gross pay algorithm. So let's name our class something that is reflective of the task that it needs to do. GrossPayCalculator. Notice here I'm using three words in the class name. However, there are no spaces. That's because Java does not allow spaces in the name of a class. Also notice that although the class name contains three different words and they're all together, each word begins with an uppercase letter. Capitalizing the first letter in each word helps with readability and it's also a convention within Java. After naming the class, click Enter and notice we now have a new class. This is our Java file. Notice the name in the open tab…
随堂练习,边学边练
下载课堂讲义。学练结合,紧跟进度,轻松巩固知识。