RosettaCodeData/Task/Case-sensitivity-of-identifiers/Java/case-sensitivity-of-identifiers.java

6 lines
364 B
Java
Raw Permalink Normal View History

2013-04-10 16:57:12 -07:00
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 + "'");