RosettaCodeData/Task/Case-sensitivity-of-identifiers/Java/case-sensitivity-of-identifiers.java
Ingy döt Net 764da6cbbb CDE
2013-04-10 16:57:12 -07:00

5 lines
364 B
Java

String dog = "Benjamin";
String Dog = "Samba"; //in general, identifiers that start with capital letters are class names
String DOG = "Bernie"; //in general, identifiers in all caps are constants
//the conventions listed in comments here are not enforced by the language
System.out.println("There are three dogs named " + dog + ", " + Dog + ", and " + DOG + "'");