Beginning Programming with Java For Dummies
Book image
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:

Dr. Barry Burd holds an M.S. in Computer Science from Rutgers University and a Ph.D. in Mathematics from the University of Illinois. Barry is also the author of Beginning Programming with Java For Dummies, Java for Android For Dummies, and Flutter For Dummies.

This article can be found in the category: