title: Classes and object issues in Java
body: <p>I have certain issue. while I do understand the reason code returns "Nothing" and 24.0 I can't quite grasp why I'm getting: "Nothing" 24.0 AND 9.0. Can someone please explain the issue better? Thank you, here is the code.</p>
  
  <pre><code>class Object {
  
      int w; int h; int d;
  
      void test() { System.out.print("araferi ");}
  
      double volum() {return w*h*d;}
  
      void volum(double x) {
  
      System.out.print(" "+ --x);}
  
   }
  
  
   public class Test {
  
      public static void main (String[] args){
  
         Object ob1=new Object();
  
         ob1.w=2;
  
         ob1.h=3;
  
         ob1.d=4;
  
         ob1.test();
  
         ob1.volum(10);
  
         System.out.print(" "+ob1.volum());
      }
  
   }
  </code></pre>