Legal Identifiers
■ Identifiers must start with a letter, a currency character ($), or a connecting
character such as the underscore ( _ ). Identifiers cannot start with a number!
■ After the first character, identifiers can contain a
ny combination of letters,
currency characters, connecting characters, or numbers.
■ In practice, there is no limit to the number of characters an identifier can
contain.
■ You can't use a Java keyword as an identifier. Table 1-1 lists all of the Java
keywords including one new one for 5.0, enum.
■ Identifiers in Java are case-sensitive; foo and FOO are two different identifiers.
Complete List of Java Keywords (assert added in 1.4, enum added in 1.5)
分享到:
相关推荐
Chapter 1: The C# Environment Chapter 2: Writing a First Program Chapter 3: Program and Code File Structure Part II: C# Language Elements Chapter 4: Data Types, Variables, and Constants Chapter 5: ...
In the first chapter, the focus is on understanding declarations and access control within Java. Key concepts include: - **Variable Declarations**: This section covers the basics of declaring ...
Chapter 1: A Tutorial Introduction Getting Started Variables and Arithmetic Expressions The for statement Symbolic Constants Character Input and Output File Copying Character Counting Line ...
Declarations, access control, and enums Object orientation Assertions and exceptions Dates, times, locales, and resource bundles I/O and NIO Generics and collections Inner classes Lambda expressions ...
### Chapter 1: Writing an ANSI C++ Program This chapter introduces the reader to the fundamentals of writing a C++ program. It covers: - **Getting Ready to Program:** Discusses the setup required to ...
* Declarations and access control * Object orientation * Assignments * Operators * Strings and arrays * Flow control and exceptions * Assertions and Java 7 exceptions * String processing, data ...
110362-8 (paperback) ISBN 0-13-110370-9 <br>Contents Preface Preface to the first edition Introduction Chapter 1: A Tutorial Introduction Getting Started Variables and ...
instant access to the Borland forums with their libraries of technical information and answers to common questions. If you are not a member of CompuServe, see the enclosed special offer, and ...
instant access to the Borland forums with their libraries of technical information and answers to common questions. If you are not a member of CompuServe, see the enclosed special offer, and ...
Memory Layout and Access 4.0 - Chapter Overview 4.1 - The 80x86 CPUs:A Programmer's View 4.1.1 - 8086 General Purpose Registers 4.1.2 - 8086 Segment Registers 4.1.3 - 8086 Special ...
Chapter 10Control Flowdescribes how control statements direct the order of statement execution. <br>Chapter 11Generic Typesdescribes generic types: how they are written and used, their power, and ...
4. **访问控制(Access Control)**:C++有三种访问级别:public, protected, 和 private。源码中的`public:`、`protected:`和`private:`关键字用于定义类成员的访问权限。 5. **对象与指针(Objects and Pointers...