课程: Java Essential Training: Syntax and Structure

今天就学习课程吧!

今天就开通帐号,24,600 门业界名师课程任您挑!

Reserved words

Reserved words

- [Instructor] Looking at this code, notice some of the words here are in a different color. The exact color varies depending on your editor and theme, but in my case, I'm referring to the words in orange. We have package, public, class, static and void. All of these are examples of reserved words. Reserved words are words that a programming language has decided means something specific within the language, and therefore, cannot be used to name things within our program. So we couldn't name something class or public or package because these words are reserved and can only be used for what Java has designated them for. There are dozens of reserved words. As we build more things together, I want you to pay attention to the colors. Anytime you type something and it turns orange or whatever color the reserved words are in your editor, make a note to yourself that this is another reserved word.

内容