I have class object rand and it has got method getRn1() getRn2() up 10 so I am using loop but it is inserting name of method as
string rather then value
for(int i=1;i<11;i++){
String one="rand.getRn"+i+"()";
String two="rand.getOc"+i+"()";
System.out.println(one);
System.out.println(two);
if(one.equals("") | | two.equals("")){}else{
String si="INSERT INTO random " +"(random_no,outcomecode)"+
"VALUES(\'"+one+"\',\'"+two+"\')";
System.out.println(si);
rows = myStatement.executeUpdate(si);
System.out.println(rows);}}
please help me
kajal_sharma