java : can't get incremented to print. 
I'm learning to do some java 101 syntax stuff.  In an exercise I'm trying to do, I can't get the incremented value to print.  any ideas? 

here is my code: 

    class StaticTest { 
    	static int i = 47;	
    }
    class incrementable { 
    	static void increment() { StaticTest.i++; }	
    }
    
    class DataOnly { 
    	
    int i;
    double d;
    boolean b; 
    
    
    public static void main (String[] args) { 
      incrementable t = new incrementable(); 
      DataOnly df = new DataOnly(); 
      df.i = t.increment(); 
      System.out.println(df.i);
    } 

}

    The error I get is: 
    aTyp0eName.java:18: incompatible types
    found: void 
    required: int 
    df.i = t.increment(); 

df.i is an int and so is t.increment.  I guessing its because increment() is void? 

thanks in advance.

java : can't get incremented to print. 
===

I'm learning to do some java 101 syntax stuff.  In an exercise I'm trying to do, I can't get the incremented value to print.  any ideas? 

here is my code: 

    class StaticTest { 
    	static int i = 47;	
    }
    class incrementable { 
    	static void increment() { StaticTest.i++; }	
    }
    
    class DataOnly { 
    	
    int i;
    double d;
    boolean b; 
    
    
    public static void main (String[] args) { 
      incrementable t = new incrementable(); 
      DataOnly df = new DataOnly(); 
      df.i = t.increment(); 
      System.out.println(df.i);
    } 

}

    The error I get is: 
    aTyp0eName.java:18: incompatible types
    found: void 
    required: int 
    df.i = t.increment(); 

df.i is an int and so is t.increment.  I guessing its because increment() is void? 

thanks in advance.
