print method in java -
I want to ask you about the print vector array, the following:
vector [ ] RoutingTable = new vector [connectivity.line]; I tried this method, but it does not work with me and it gives me the protocol.Route@c17164 when I print in the main , Code here, can you tell me why he does not print the correct value?
public string print RT (at hop) {string s = ""; (Int i = 0; i & lt; conf.routingTable [hop]. Size (); i ++) {s = "ROUTING TABLE" + conf.routingTable [hop] .get (i); } Return S; }
It looks like you need to implement the toString () Is the method protocol. Route .
class pathway {public string toString () {"some strings that makes sense"; }}
Comments
Post a Comment