Retype the statements, correcting the syntax errors. system.out.println("num: " + songnum); system.out.println(int songnum); system.out.println(songnum " songs"); note: these activities may test code with different test values. this activity will perform two tests: the first with songnum = 5, the second with songnum = 9. see how to use zybooks.

Respuesta :

  1. System.out.println("num: " + songnum);

This will print

num:5  

OR

num:9

     2.  System.out.println(int songnum);

Remove the "int" and recompile. Rewrite it as System.out.println(songnum);

Then it will print

5

OR

9

     3.  System.out.println(songnum " songs");

Rewrite it as System.out.println(songnum + " songs");

Then it will print

5songs

OR

9songs


For all this make sure songnum is declare and initialised as int songnum=5;

or int songnum=9;