Best method for creating a collection.

hi,
i've written a loop which specifies the content of a name,age and location String for each time it goes through the loop.
I've also created a Person() class which has the ability to set these strings as its variables.
What would be the best collection to use for putting together lots of Person() objects each with their own variables(set by the loop).
I've tried using an Person[] and using the variable i to set a person for each location for example
person [] people = new person[100]
int i = 0
public void loadPeople()
for(i = 0; i < 100; i++){
name = //Changing variable read from text file;
age = //changing variable read from text file;
location = //changing variable read from text file;
people[i] = new Person(name, age, location);
}however if i use the method
System.out.println("people[1].name");i get "null"; and name is definately public.
So i was wondering basically if there is something else a little better to use as a collection.
Thanks
Richard.

<wearing psychic hat>
I bet the constructor looks amazingly similar to this:
public Person(String name, int age, String location)
  name = name;
  age = age;
  location = location;
}</wearing psychic hat>
Am I right?
If so, think about what this means.
name = name;
Assigns the value of a variable to itself. Not terribly useful, huh?
How about this instead?
this.name = name;
Assigns the value of the local name parameter to the attribute named 'name' of this object.

Similar Messages

  • What is the best method for creating a simple DVD from X?

    Now that I no longer have DVD SP on my system, I need to know the preferred method of creating a simple menu driven DVD. The DVD needs to have a simple (one click) since the local cable company needs that so it will trigger at a specified time. I shoot in 720p 60. The DVD is SD. I do have Toast, Compressor, and iDVD on the computer. Any input will really be appreciated. Thanks in advance.
    Cheers.
    Tom

    Thanks Luis.
    Can't beleive I missed that. I am so used to using Compressor or Toast. This method works great. Thanks.
    Best.
    Tom

  • Best methods for creating e-books from FrameMaker 10 (TCS 3.5)

    I would like to know your thoughts on which of the following methods is the best, and easiest, way to create e-books from FrameMaker. I will most likely be using Calibre to do the file conversion.
    (1) Using File > Publish > ePub to create an ePub file, which can then be imported into Calibre.
    (2) Using the File > Save Book As > HTM command (which creates a separate HTML file for each FM file), editing the HTML files in RoboHelp (or another HTML editing tool), then importing all of the HTML files into Calibre.
    Note that when I published to HTML from FM, it appears that only an output file was created from RoboHelp, as I could not find any HTML files were actually created. Is that the case, or was I just not looking for the HTML files in the right place?
    If anyone has any other recommendations, please let me know! Thanks!

    I linked the FrameMaker book to RoboHelp, then generated an ePub file from RoboHelp, and have a couple of issues.
    (1) When I open the ePub file in Calibre and Adobe Digital Editions, there is no contents section within the book. The only contents is the contents in the navigation bar. How do I generate a contents to appear in the front of the ebook, or do I have to create that manually in RH? I did specify the settings in RH to convert the FM contents.
    (2) The ePub file looks much better in Calibre than Adobe Digital Editions. Should I be concerned about this? Which viewer should I rely on?

  • Best method for creating a PDF Brochure???

    Hello,
    I would like to create a printable PDF brochure and post it on my website [url deleted by host]. I’ve tried just using the existing web pages and think I could get something better looking starting from scratch. I just started working with Acrobat 9 extended and am not too familiar with it’s potential. Any suggestions whether I should do it all in Acrobat, or use a different program and import it. I have the Adobe Web Premium  Suite 4 with Fireworks and Illustrator.
    Thanks.

    Use whatever desktop publishing application that you have then use Acrobat to print to a PDF. Do
    n't use Acrobat for the layout. That's not what it is for.

  • Best method for dynamically populating PDF on the web?

    Hi there,
    I'm trying to find a web-based solution to populate text within an existing PDF with a person's name (using a name variable within the PDF body copy in several spots).  I know that LiveCycle Designer is the best method for creating dynamic PDF's but since I'm on a Mac, LiveCycle Designer wasn't packaged with my CS5 Suite / Acrobat 9 and I'm not eager to run windows in parallel and pay for acrobat pro a second time just to have it on windows for the LiveCycle functionality...CS5 wasn't cheap ha. 
    So I'm trying to find out if there are alternative ways to achieve this without going down that road.  I don't mind writing PHP or using some other programming language to set it up online, but I just seem to be finding many different methods coming up and cannot find the most straightforward solution.
    Any help is greatly appreciated!

    LiveCycle Designer won't do what you want. It requires server software: LiveCycle Forms will do the trick.
    You can find information on it here: http://www.adobe.com/products/livecycle/forms/

  • Best method for rounded corners?

    Hi all,
    Can someone please share the best method for creating rounded corners similar to the menu interface in Leopard? Actually the best representation I've seen, is in the Motion 3 Tutorials - Working with 3D. The Matte Shape filter in FCP is close, but not quite the cigar I'm looking for.
    Thanks!

    Hi Jim,
    • Select Clip
    • Add 4 point Garbage Matte
    • Activate all 4 corners by clicking on the labels 1-4
    • Adjust settings to your desires.
    As an example I used:
    • Smooth = 12
    • Choke = -47
    • Feather = 2
    Worked like a charm.

  • Best method to create a spinnable flower windmill for iPad and Android

    What is the best method to create a spinnable flower windmill for iPad and Android?  I want to be able to drag and spin.  The faster you drag, the faster it should spin.  Each petal will have an image which will be its own link.  Any links to tutorials, toolkits, and recent examples are greatly appreciated.  Thank you.

    Here's a whell that spins, but it has a spin button instead of being able to drag it:
    http://www.switchonthecode.com/tutorials/creating-a-roulette-wheel-using-html5-canvas
    Seems to me the best ui would be to be able to drag it and stop it or drag it and spin it at various speeds.

  • Best method for refreshing a component's data?

    What's better when you want to refresh the content of an object? Should you just replace your JComponent with an entirely new one, or should you try to get access to the data and then remove the items and then re-add them.
    In my example, I have a JTree and am not sure which would be the best method to use. Should I try to remove all the nodes, or sometimes I think it would be easier to just remove the tree component from my panel, create a new tree and re-populate it?
    Thanks for any advice.

    pjbarbour wrote:
    I'm not quite sure what would be the best method for this.  My client is using a 4x3 screen and SD projector at a large meeting, and they want me to just create a DVD that is letterboxed.  I have one Premiere CS5 project that's 1920x1080, and another project that's 720x480 widescreen (1.2).  I created a new sequence in both projects that is 720x480, 4x3 (0.9), and what I do is just scale the timeline down so that it's letterboxed.  Is this the best method for achieving this?  Or would you do something else?  I don't like the idea of scaling my timeline down in Premiere.
    Hello.
    As Jim so rightly points out above, you do not need to do anything.
    Just use your normal 16:9 widescreen footage, and author as normal.
    Your player will letterbox automatically when it is connected to a 4:3 screen in setup (just make sure "Pan & Scan" is not also there)

  • Best Method for Strechable .swf file in horizontal but not vertical?

    What is the best method to create an easy to use flash file
    that will allow horizontal scaling with a fixed vertical size?
    This will be for a blog header in a variable width design at
    Make Light Real.com
    I have tried the basic stage properties and found
    StageScaleMode.NO_BORDER to be an ok solution, but I'm not
    sure what will happen when I begin to drop active clips in on the
    stage. Will the stage operate from a fixed point or how will the
    clips orient to the stage as it expands?
    My understanding of actionscript is just enough to hack
    pieces of what I need together: but if you could enlighten me with
    the most basic understanding of which method would work best for me
    I'd apprecate it. I also have this method to alter the background
    (as a clip):
    quote:
    Stage.addListener(ecout);
    // function which replaces all the elements with the new
    values
    slide = function () {
    photo_mc._x = 0;
    photo_mc._y = 0;
    photo_mc._width = Stage.width;
    photo_mc._height = Stage.width/rapp;
    if (photo_mc._height<Stage.height) {
    photo_mc._height = Stage.height;
    photo_mc._width = Stage.height*rapp;
    slide()
    Should I just alter the variables there to lock the stage
    height?
    Thanks for your time in answering.

    When you export your movie you can select the scaling options
    for width and height.
    Try selecting one but not the other.
    Cheers,
    Gorka
    http://www.AquiGorka.com/blog

  • Best Method for transferring projects back and fourth

    Hello. I will soon be purchasing an iMac for home use and would like to get some advice on project transfer. I will be doing a lot of video editing back and fourth between the office and home. What is the best method for doing this? Where can i locate the files to make sure that I have everything and wont be missing anything when I bring it home, etc. Thanks for any advice!
    Brandon

    Use a (Firewire 800 or faster) external HD to keep your media, events and projects on.
    You can then take the drive to work with you and back home. Use FCP X to transfer (or create) the event and projects on this drive and both macs will recognise it.
    The drive must be formatted Mac OS Extended (journaled is not important for video drives).
    Andy

  • Best method for UIComponent Initialization?

    I have a custom class that extends Panel and I would like to
    get input on the best method for initializing custom properties
    upon object creation. I currently create an event handler for the
    FlexEvent.CREATION_COMPLETE event and assign my properties then.
    However, I'd like to slim my code down. Is there a place I
    can initialize properties without having to import events? I tried
    overriding some protected methods such as commitProperties, but
    discovered this method gets called again by Flex when effects are
    done playing on the UIComponent. I don't want to initialize my
    custom parameters again because this is essentially reseting any
    interaction the user did with it.
    Is there another super method I can use to initialize my
    method rather than use CREATION_COMPLETE events?
    Thanks.

    The simplest and cheapest option is LifeFlix.  They have more info at www.lifeflix.com or on the Mac app store at https://itunes.apple.com/us/app/lifeflix/id630212114?ls=1&mt=12

  • Best method for networking with ubuntu linux

    Hi,
    I'm setting up an ubuntu linux fileserver, and I was wondering what the best method for filesharing with my mac is. I'm currently running osx 10.4.11, though I may be upgrading to 10.5 soon. I'll be running SMB networking for a couple of other computers, but I'd prefer something a bit more robust that can handle file permissions etc.

    Mac OS X supports NSF out of the box. Configuration isn't documented.
    I recall Apple got rid of net info manager in Leopard, so the configuration will be different. Perhaps more unix like.
    Mac OS X support the Unix Network File System (NFS). However, it leaves out
    the GUI.
    This page show you how to use NetInfo Manager:
    http://mactechnotes.blogspot.com/2005/09/mac-os-x-as-nfs-server.html#c1168221713 40271068
    NFS Manager can both setup NFS shares and connect to NFS shares.
    http://www.bresink.com/osx/NFSManager.html
    Once you figure out how NFS Manager configures the NFS shares, you can
    use Applications > Utilities > NetInfo Manager to create more shares.
    You will either have to coordinate Unix Userid number and Unix Group Id number or use the mapall option on the share.
    To find out your Mac OS X userid and group id do:
    applications > utilities > terminal
    ls -ln
    ls -l
    # lists the NFS share on your mac
    showmount -e localhost
    #list NFS shares on a remote host
    showmount -e remote-ip-address
    Once you see what NFS Manager does, you will be able to use NetInfo Manager to manage a connection. In Mac OS 10.4 you can configure the /etc/exports control file. See man exports for the details. Before that you had to have the data in NetInfo manager. When Mac OS X came out, many common Unix control files were not present. Instead the data had to be in NetInfo manager. Over time Apple has added more and more standard Unix control files.
    ======
    You do know about the need to match userids & groupids.
    # display uid and gid
    ls -ln
    sudo find / -user short-user-name -exec ls '-l' {} \;
    # on Mac OS X
    you will need to go into NetInfo Manager and select user and find your short-user-name. Change uid and guid.
    #on Linux look in
    /etc/passwd
    /etc/group
    # with care...
    # change 1000:20 to your values for uid:gid
    sudo find / -user short-user-name -exec chown 1000:20 {} \;
    The manual for Tenon MachTen UNIX (which Apple checked when doing Mac OS
    X) says that one should crate the file /etc/exports, which will cause
    portmap, mountd and nsfd to launch at startup via the /etc/rc file. The
    file must not contain any blank lines or comments, and each line has the
    syntax
    directory -option[, option] hostlist
    where 'directory is the pathname of the directory that can be exported,
    and 'hostlist' is a space separated list of hostnames that can access the
    directory. For example
    /usr -ro foo bar
    /etc
    /Applications
    /User/gladys gladys
    The client the uses a command like
    /sbin/mount -t type [-rw] -o [options] server:directory mount_point
    where 'type' is 'nfs', 'server' the name of the server, 'directory' the
    server directory mounted, and 'mount_point' the client mount point. See
    'man mount' for details.
    I haven't tried the above, but it would be nice to know if it works on Mac OS X.
    Hans Aberg
    This will give you some hints on NFS. Post back your questions.
    Robert

  • Best Method for converting a 16x9 video to a letterboxed 4x3 DVD

    I'm not quite sure what would be the best method for this.  My client is using a 4x3 screen and SD projector at a large meeting, and they want me to just create a DVD that is letterboxed.  I have one Premiere CS5 project that's 1920x1080, and another project that's 720x480 widescreen (1.2).  I created a new sequence in both projects that is 720x480, 4x3 (0.9), and what I do is just scale the timeline down so that it's letterboxed.  Is this the best method for achieving this?  Or would you do something else?  I don't like the idea of scaling my timeline down in Premiere.

    pjbarbour wrote:
    I'm not quite sure what would be the best method for this.  My client is using a 4x3 screen and SD projector at a large meeting, and they want me to just create a DVD that is letterboxed.  I have one Premiere CS5 project that's 1920x1080, and another project that's 720x480 widescreen (1.2).  I created a new sequence in both projects that is 720x480, 4x3 (0.9), and what I do is just scale the timeline down so that it's letterboxed.  Is this the best method for achieving this?  Or would you do something else?  I don't like the idea of scaling my timeline down in Premiere.
    Hello.
    As Jim so rightly points out above, you do not need to do anything.
    Just use your normal 16:9 widescreen footage, and author as normal.
    Your player will letterbox automatically when it is connected to a 4:3 screen in setup (just make sure "Pan & Scan" is not also there)

  • Best Method For Importing Clips Between FCP Projects

    What is the best method for importing clips between FCP 7.0.3 projects?  I am wondering whether or not pulling the clips from the Capture Scratch folder is the way to go or will using Import from the new FCP project create a new folder in Capture Scratch with the imported clips?  I have a new HD camcorder with different clips for different projects and Log and Transfer makes it so easy to bring them all in at once but now wondering how best to separate them into separate Capture Scratch folders for each project. 

    well, I simply either drag them in to the new/different project from the finder, or drag or copy and paste between open fcp projects.  Never had any problems working this way.  Just remember that if you delete a specific project scratch disk folder, you may be deleting media used in another project.

  • Best method for plotting data array?

    I am reading data from a Delta Motion controller and writing that data to an array in my vb.NET program.  The data is not time stamped but I know what the sampling interval is (0.001s).  I want to take that data and plot it on my Waveform Graph.  What is the best method for doing this?  I'm sure this is simple, but I'm new to MS and LV.
    Private Sub btnRampUpA_Click(sender As Object, e As EventArgs) Handles btnRampUpA.Click
    Dim Axis0ActualPrsData() As Single = New Single(4096) {} 'Create array for data from the RMC controller to be read into
    Dim Axis0Actual() As AnalogWaveform(Of Single)
    If RMC.IsConnected(PingType.Ping) = True Then 'Check to make sure comms to RMC is good before trying to read data from it
    Try
    RMC.ReadFFile(FileNumber150.fn150Plot0StaticUA0, 112, Axis0ActualPrsData, 0, 4095) 'read the plot data where sample period = 0.001
    Catch ex As ReadWriteFailedException
    MessageBox.Show("Unable to read plot data from the RMC. " & ex.Message)
    End Try
    End If
    End Sub
    Thank you

    PlotYAppend appears to be the answer according to the white page, although I don't have it working as of yet.  Can someone confirm?

Maybe you are looking for

  • Song order in ipod/itunes

    hello everyone, i have a small problem with itunes/ipod: sometimes an album won't show up in itunes with the songs in the right order, and renaming the track numbers won't change that (ex: tracks 1,2,3,4,6,7,8,9,10 and track 5 at the end). When i upl

  • Mountain lion ejects external hard disks

    After upgrading to Mountainlion (March 5, 2013), my LaCie external hard disk (500 GB, used for TimeMachine) was spontaneously and improperly ejected, presumably by the OS. (1) The disk had worked without problems under OS 10.7. (2) The disk mounts pr

  • Max condition value - exceeds while creating a SO

    Hi All, I have a requirement which we are trying to meet up by a solution:- Requirement:- A fund value (e.g. 1,00,000) is to be allocated on a particular spend which is offered to customers (e.g. discounts) So as and when the discounts are offered on

  • Why does Google maps not render "Earth view" properly in Firefox, but works fine in other browsers?

    I've been using firefox forever, use it with google maps, mostly with earth view and suddenly, it shows a diagonal mirror image of the map from the bottom right corner to the top left. Google maps in Chrome works fine and maps in Google Earth also wo

  • ASA-SSM-40 Keeps Crashing

    Hi My IPS has recently started crashing.  The only way it will function normally is if i do a hw module 1 reload.  It comes back online with green health status for all and then crashes after about 10 mins of activity.  Please see the health output a