title: Printing the name of an object in Java
body: <p>I have researched, and although this is a really simple issue, I am not sure how to solve it.</p>
  
  <p>The code I have looks like this:</p>
  
  <pre><code>public class Playlist {
  
     public Playlist(String name) {
  
     }
  }
  </code></pre>
  
  <p>Separate files of course: </p>
  
  <pre><code>@Test
  public void CreatePlaylist(){
      Playlist myPlaylist = new Playlist("Workout Playlist");
  
  }
  </code></pre>
  
  <p>I am trying to print the actual name of this new playlist "workout playlist" but I can't seem to find a way to do so. </p>