pls help me out its critical ...... how can we use an arralylist reference
public List fetchTicketkey()
{
ArrayList li = new ArrayList();
String str="";
try
{
String query = "select tktkey from tktgame2day1 where start_draw=1";
System.out.println("IN THE METHOD ");
con=databaseConnection.getConnection();
pstmt=con.prepareStatement("query");
rs=pstmt.executeQuery();
while(rs.next())
{
li.add(rs.getString("area_name"));
}
rs.close();
con.close();
}
catch(Exception e)
{
System.out.println(" ERROR in getting the values from tktgame2day1 Table "+e);
}
return li;
}
public static void main(String[] args)
{
}
There is a ArrayList called ArrayList li = new ArrayList();
Actually i want to access the above arralylist reference ie (ArrayList li = new ArrayList();;) in the main method ie ( public static void main(String[] args)).
how can we use an arralylist reference (ie arraylist declared in a method ) to be used in an main method (i need the code )
can any one help to find the code for the above application ie