doubt in return statement
hai....i am using simple java file with MS-Access db...i want to know whether is it possible to return more than one value using return stmt?
for example in bank database after user created his account ...it has to return his new account no and pin no...plz...help me...
Thanks in advance...
# 2
Gently use DTO's.
public class Account {
private Long id;
private String name;
private Integer pin;
// + getters + setters
}
Account account = null;
if (resultSet.next()) {
account = new Account();
account.setId(new Long(resultSet.getLong("id")));
account.setName(resultSet.getString("name"));
account.setPin(new Integer(resultSet.getInt("pin")));
}
return account;