Basic Java Language: Difference between revisions

wikademia>Historybuff
wikademia>Historybuff
→Exercises: reword
Line 260: Line 260:


=Exercises=
=Exercises=
A. Create a program that creates a String with the value "ABC". Then print the value using System.out.println(StringIdentifierHere). You could also do System.out.prinln("ABC"), but we are focusing on creating variables.
A. Create a program that stores a String with the value "ABC". Then print the value using System.out.println(StringIdentifierHere). Don't use System.out.prinln("ABC"), as we are focusing on creating variables.


B. Do the above with a long set to 10000. Note that you have to say System.out.println(LongIdentifier + "").
B. Do the above with a long set to 10000. Note that you have to say System.out.println(LongIdentifier + "").