notesOnIdentifier

notesOnIdentifier - Java Identifiers and keywords Java...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
Java Identifiers and keywords Java identifiers consist of letters, digits, and some special characters The Java language is case sensitive. Class names typically begin with an initial character capital. Method and variable names begin with a lowercase letter. Identifiers in Java must start with a dollar sign, an underscore, or a letter. &account is not a valid identifier. “myQuotation” Starting with a quotation mark makes the identifier invalid. The following categories of keywords and reserved words cannot be used as identifiers in Java: Access modifier : include the keywords private , protected , and public . Whereas private and protected declare restrict access, public declares a piece of code totally accessible to the rest of the program. Flow control : These are the keywords that control the sequence of execution of the statements in a Java program and they are break , case , continue , default , do , else , for , if , return , while , and switch . Exceptions:
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 2

notesOnIdentifier - Java Identifiers and keywords Java...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online