I have method to call getSystem() by passing parameter ipadd, I have two class as mentioned below
SystemReport Class
public class SystemReport
{
protected System[] system;
public ComputerSystemResponse ()
{
}
public void setSystems( System[] system )
{
this.system = system;
}
public System[] getSystem()
{
return system;
}
}
System Class where site details reside which i'm interested in,
public class System
{
protected String site;
public System()
{
}
public System(String site)
{
this.site=site;
}
public void setSite(String site)
{
this.site = site;
}
public String getSite()
{
return site;
}
}
Method in different class & trying to retrieve value of site through looping
SystemReport rep = classInstance.getNames(ipadd);
System[] test = rep.getSystem();
Return type of getNames
protected SystemReport getNames (ipadd)
{
SystemReport rep = new SystemReport();
return rep;
}
Answering Questions:
1. classInstance.getNames(ipadd) has return type of SystemReport
2. rep size is > 0
now i would like to get site from rep, I tried checking the length by doing test.length is 0. What am i missing ?
classInstance.getNames(ipadd);getNames.. How does it return'sSystemReport