My code wont run in the terminal for the desertIslandPlaylist project

So I’ve tried to compile by typing “javac Playlist java” and it shows no errors.

Then I typed “java Playlist” and pressed enter and nothing shows up for that either. What am I doing wrong?

No output generally indicates success.
Any reason why there would be output? For example, if you execute code like this:

System.out.println("hello world");

then something would show up.

1 Like

I have the same problem… nothing shows in Terminal. i have several lines with system.out.println(…
the exercise said that:
We’ve included a workspace for you to test out your newfound knowledge of arrays and ArrayLists.
Remember: To run your code, enter the following in the terminal: java List.

so I typed java List and nothing

You need to compile java code before you can run it.
(also you haven’t shown what code you’re running, maybe it really shouldn’t print anything)

You might want to try it on your own computer.

import java.util.ArrayList;

class List {

public static void main(String args) {
ArrayList toDos = new ArrayList;
String toDos0 = “abc”;
String toDos1 = “bcd”;
String toDos2 = “cde”;
System.out.println(toDos.set(0, “ABC”));


If you compile that you’ll get error messages.