Java Forums

Main Menu
Home
Today's Posts
FAQ
Search
Contact Us

Java Network
Java Tips
Java Tips Blog

Sponsored Links





Welcome to the Java Forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community, you will:

  • have access to post topics
  • communicate privately with other members (PM)
  • not see advertisements between posts
  • have the possibility to earn one of our surprises if you are an active member
  • access many other special features that will be introduced later.

Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 04-15-2008, 09:12 AM
Member
 
Join Date: Apr 2008
Posts: 33
raj reddy can only hope to improve
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
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Help In An Critical Query raj reddy Database 1 04-22-2008 03:24 AM
pls help me out its critical ...... how can we use an arralylist reference raj reddy Advanced Java 1 04-15-2008 01:09 PM
Getting the Object Reference Name Deathmonger New To Java 2 03-12-2008 03:51 PM
reference to elements in array Igor New To Java 1 12-14-2007 12:56 PM
Object and reference katie New To Java 1 08-07-2007 12:00 AM


All times are GMT +3. The time now is 10:23 PM.


VBulletin, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2006 - 2007, www.java-forums.org