Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > Hey newb problem here need help

Reply
Thread Tools

Hey newb problem here need help

 
 
samyouel samyouel is offline
Junior Member
Join Date: Feb 2009
Posts: 1
 
      02-16-2009
Hey alright heres what im trying to accomplish.

I want to be able to add strings to an arraylist and then give them a numerical value.
Like:

int coolness;
static ArrayList<String> people = new ArrayList<String>();
people.add(sam);


and then something like
people.sam.coolness = 999999;


How is this accomplished? thanks!
 
Reply With Quote
 
 
 
 
code learner code learner is offline
Junior Member
Join Date: Dec 2010
Posts: 19
 
      01-09-2011
Quote:
Originally Posted by samyouel
Hey alright heres what im trying to accomplish.

I want to be able to add strings to an arraylist and then give them a numerical value.
Like:

int coolness;
static ArrayList<String> people = new ArrayList<String>();
people.add(sam);


and then something like
people.sam.coolness = 999999;


How is this accomplished? thanks!
not sure about your question but would not it work
people.sam.coolness = String.valueOf(999999);
 
Reply With Quote
 
 
 
Reply

Thread Tools

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

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Database/profile Hey here's a puzzle icurfmn8 ASP .Net 2 02-07-2006 07:51 AM
Graphs in ASP? ASP newb here Jose M Hernandez ASP General 12 01-10-2006 11:56 AM
total newb here gerg Python 1 01-09-2006 12:44 AM
HEY HEY HEY hold up...... Ron Williams MCSA 0 08-11-2003 07:19 PM
Re: Complete Newb Here Evan C++ 0 06-27-2003 05:42 PM



Advertisments