Results 1 to 1 of 1
- 04-15-2008, 08:12 AM #1
Member
- Join Date
- Apr 2008
- Posts
- 31
- Rep Power
- 0
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
Similar Threads
-
Object and reference
By katie in forum New To JavaReplies: 2Last Post: 10-19-2009, 03:45 PM -
Help In An Critical Query
By raj reddy in forum JDBCReplies: 1Last Post: 04-22-2008, 02:24 AM -
pls help me out its critical ...... how can we use an arralylist reference
By raj reddy in forum Advanced JavaReplies: 1Last Post: 04-15-2008, 12:09 PM -
Getting the Object Reference Name
By Deathmonger in forum New To JavaReplies: 2Last Post: 03-12-2008, 02:51 PM -
reference to elements in array
By Igor in forum New To JavaReplies: 1Last Post: 12-14-2007, 11:56 AM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks