title: Using Jenkins script console and seeing the Groovy output
body: <p>When I run simple statements in the script console I can see the output printed, e.g.</p>
  
  <pre><code>println "hello"
  </code></pre>
  
  <p>However with this code I see no output printed when run in Jenkins script console. Do you know why ? The code prints just fine when run from computer command line.</p>
  
  <pre><code>class Product{
  
      private String name
      private def price
      def vendor
  
      public Product(){
      }
  
      Product(name, price, String vendor){
          println "Constructor";
          this.name = name
          this.price = price
          this.vendor = vendor
      }
  
      public String getName(){
          return name
      }
  
      def setName(name){
          this.name = name
      }
  
      public String getPrice(){
          return price
      }
  
      def setPrice(price = 100.00){
          this.price = price
      }
  
      def String toString(){
          return "Name = $name, Price = $price, Vendor = $vendor";
      }
  
      static main(arguments){
  
          def p1 = new Product("Mobile", "10000", "Nokia")
          println(p1.toString())
          println "Hello"
      }
  }
  </code></pre>