6 lines
364 B
Java
6 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 + "'");
|