diff --git a/source/ch2_firstjavaprogram.ptx b/source/ch2_firstjavaprogram.ptx index 8fa1e56..c1cb7a1 100644 --- a/source/ch2_firstjavaprogram.ptx +++ b/source/ch2_firstjavaprogram.ptx @@ -366,6 +366,9 @@ Hello World! + + + @@ -476,6 +479,51 @@ Hello World! + + + +

+ Construct a complete Java program that prints your name and your favorite color to the console. + Drag the blocks into the correct order on the right. +

+
+ + + + public class NameColor { + + + class NameColor { + + + + + + public static void main(String[] args) { + + + public static main(String[] args) { + + + + + + System.out.println("Name: Alex"); + System.out.println("Favorite Color: Blue"); + + + system.out.println(Name: Alex); + System.out.println("Favorite Color: Blue") + + + + + } + } + + +
+ \ No newline at end of file