You are on page 1of 1

String

String
String
String
String

question1=null;
option1=null;
option2=null;
option3=null;
option4=null;

try
{
Class.forName("oracle.jdbc.OracleDriver");
Connection con = DriverManager.getConnection("jdbc:oracle:thin:@localhos
t:1521:XE", "system", "saiji");
Statement s = con.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, Res
ultSet.CONCUR_READ_ONLY);
rs = s.executeQuery("SELECT * FROM KBC_QUESTION");
Statement s1 = con.createStatement();
rs.first();
question1 = rs.getString("QUESTION");
option1=rs.getString("OPTION_A");
option2=rs.getString("OPTION_B");
option3=rs.getString("OPTION_C");
option4=rs.getString("OPTION_D");
jLabel1.setText(question1);
jRadioButton1.setText(option1);
jRadioButton2.setText(option2);
jRadioButton3.setText(option3);
jRadioButton4.setText(option4);
}
catch (Exception e)
{
System.out.println(e);
}

You might also like