Home

Java Identifiers That You (the Programmer) Declare

|
Updated:  
2017-07-12 23:42:21
|
Java Essentials For Dummies
Explore Book
Buy On Amazon
In your own Java program, you can make up names to your heart's delight. For example, in the code

double multiplyByTwo(double myValue) { return myValue * 2; }

the names multiplyByTwo and myValue are your very own identifiers.

When you create a new name, you can use letters, digits, underscores (_), and dollar signs ($). But don't start the name with a digit. If you try to start a name with a digit, Java replies with a "Please don't do that" message.

About This Article

This article is from the book: 

About the book author: