0
我正在提取数据数组并在Java中的对象内设置这些数据。从数组中提取数据并将其设置在java中的对象中
我不知道,从数组中获取数据后,如何将其设置为一个对象?
请看看下面的代码:
public class Legform implements Serializable {
private SecurityType securityType;
public SecurityType getSecurityType() {
return securityType;
}
// As well as a setter Method also present
}
我提取这腿型对象(上面一个)在这里从另一个Java类所示:
Legform[] legdata = orderform.getLeg();
循环后通过这些数据,我需要将它们设置在另一个名为Leg的对象(Java类)中
for(int i = 0; i < legdata.length; i++) {
System.out.println(legdata[i].getSecurityType());
// Here do i need to set the data into the Leg Object
}
我需要设置此提取信息腿部对象 腿对象如下所示:
public class Leg
{
public String securityType;
}
可能有人帮助我吗?
非常感谢。 – Pawan