title: Why am I getting "<identifier>Expected" when I am just trying to use System.out.println("name")?
body: <p>New programmer here... I am taking an intro to java class and the project I am working on requires that I write a program that can create objects, assign values within those objects, and then return those values. Here is my code:</p>
  
  <p>class 1:</p>
  
  <pre><code>public class Ball{
  private double size;
  private String brand;
  
  public Ball(){
  size = 8.5;
  brand = "SportsBall";
  }
  
  public String getBrand(){
  return brand;
  }
  
  public double getSize(){
  return size;
  }
  </code></pre>
  
  <p>class 2:</p>
  
  <pre><code>public class Output{
  
  Ball test = new Ball();
  System.out.println(test.getSize());
  System.out.println(test.getBrand());
  }
  </code></pre>
  
  <p>these are both classes in the same project in BlueJ, I have set the "uses" arrow from class 2 to class 1. When I try to compile class 2 as it is written above, it gives the error "Expected" pointing out the System.out.println(error indicator here)(test.getSize()); line. I delete the line, and it throws the error for the other one. I used an explicit string with System.out.println("text"); and it gives the same error. I can't find anything on google that is very helpful, as most of the time these errors seem to be with more complex code than just a system output. </p>
  
  <p>What am I missing from my code to get a simple output? </p>
  
  <p>Edit: This is actually a duplicate of <a href="https://stackoverflow.com/questions/25585393/identifier-expected-when-trying-to-call-a-class">&lt;identifier&gt; expected when trying to call a class</a> - My apologies.</p>