hi all,
Iam new in java programming.Iam a student and i must work in netsnmpj and create like the example GetSysDescr.java the GetifInOctets.java
Ihave write this code,surely there are wrongs

import org.netsnmp.* ;
import org.netsnmp.ASN.* ;

public class ifInOctets {

static OID ifInOctetsOID ;
static class MyListener implements NetSNMPAction {

public synchronized boolean actionPerformed(int result, NetSNMPSession sess, PDU rcvPdu, Object o) {
ASNValue val = rcvPdu.findValue(ifInOctetsOID) ;

this.notify() ;

if( result == NetSNMP.STAT_TIMEOUT ) {
System.err.println("Timeout no response") ;
return false ;
}

System.out.println("got ifInOctets = " + val) ;
return true ;
}
}

public static void usage() {
System.out.println("usage:") ;
System.out.println("java org.netsnmp.GetifInOctets hostname community") ;
}

public static void main(String[] args) throws MIBItemNotFound, NetSNMPSendError, IllegalStateException, InterruptedException {
NetSNMPSession sess ;
NetSNMPAction myListener = new MyListener() ;

if( args.length < 2 ) {
usage() ;
System.exit(2) ;
}
String host, community ;

host = args[0] ;
community = args[1] ;

sess = new NetSNMPSession(host, community) ;
sess.addListener(myListener) ;
ifInOctetsOID = new DefaultOID("SNMPv2-MIB::ifInOctets.10") ;
PDU pdu = new PDU(NetSNMP.MSG_GET) ;
pdu.addNullEntry(ifInOctetsOID) ;

synchronized( myListener ) {
sess.send(pdu, null) ;
myListener.wait() ;
}
}

}

An other problem that i have is how to create the GetifInOctets.class ?
Thanks in advance,vaso!