Identifiers in the Java API - dummies

By Barry A. Burd

Part of Beginning Programming with Java For Dummies Cheat Sheet

The Java API (Application Programming Interface) has thousands of identifiers. Each identifier is the name of something (a class, an object, a method, or something like that). These identifiers include System, out, println, String, toString, JFrame, File, Scanner, next, nextInt, Exception, close, ArrayList, stream, JTextField, Math, Random, MenuItem, Month, parseInt, Query, Rectangle, Color, Oval, paint, Robot, SQLData, Stack, Queue, TimeZone, URL, and so many others.

You can reuse any of these names for any purpose in your code. But if you do, you might have trouble using a name with its normal meaning from the Java API. For example, you can write

int System = 7;

java.lang.System.out.println(System);

But you can’t write

int System = 7;

System.out.println(System);