Search:

Type: Posts; User: mwebb

Page 1 of 2 1 2

Search: Search took 0.24 seconds.

  1. Replies
    10
    Views
    1,063

    Re: How to properly make this ArrayList?

    But how would I go about retrieving say a random object from both ArrayLists as if they were one? That's kind of why I was trying to see if I can co-mingle the data.
  2. Replies
    10
    Views
    1,063

    Re: How to properly make this ArrayList?

    They contain mingled Strings and ints as in {1,2,3,4,5,6,7,"Food","Donut","Cow","STD"...}.
  3. Replies
    10
    Views
    1,063

    Re: How to properly make this ArrayList?

    As of earlier I figured I could make the ints into Strings and cast them back into ints after retrieving them. But I'll clarify because I'm still open to better techniques.

    I have 52 items that...
  4. Replies
    10
    Views
    1,063

    How to properly make this ArrayList?

    I have worked with these a few times but they are still somewhat of a mystery to me. I am currently working on a script in which I need to implement an ArrayList so I can edit the data when I need...
  5. [SOLVED] Re: Putting Trajectory of a Projectile formula in Java form.

    Hmm, interesting point. Well I am supposed to use the toRadians() method but I haven't figured out what to use that for. I'll try that.

    EDIT: Well, turned out I am getting a closer figure when...
  6. [SOLVED] Putting Trajectory of a Projectile formula in Java form.

    It's part of my assignment. Though, I keep getting different and negative numbers but I'm not sure why. I'm supposed to use the formula:

    V^2*sin(2*A)

    g

    Where V = launch speed A = Angle (A...
  7. Replies
    4
    Views
    869

    [SOLVED] Re: Filling a 2D array with other arrays.

    Hmmm, well in the output there is supposed to be 42 numbers of data, 7 per column. So I don't really know....

    Ahh stupid me. After the second for loop, a formula must be added to take the...
  8. Replies
    4
    Views
    869

    [SOLVED] Re: Filling a 2D array with other arrays.

    What is i in your example? So in comparison to my example, you mean set it up like:

    myHUT[0][] = sot[];
    myHUT[1][] = fet[];
    wouldn't that mean not using the for loops then? I sort of need to use...
  9. Replies
    4
    Views
    869

    [SOLVED] Filling a 2D array with other arrays.

    I am completely novice to the 2D arrays but so far I have been grasping the concept. Except one issue. I have an assignment that in one of the methods, a multi-dimensional array with columns and rows...
  10. Re: Creating an array in constructor ... defaults all values?

    Ah, I did something like that, and got it working. Before I realized this forum was back to normal, I had the guys at Stack Overflow forum help me out. Thanks though.
  11. Creating an array in constructor ... defaults all values?

    For some reason I am having a very difficult time trying to initialize and store values in arrays within a constructor. When I use the debugger to check the arrays values, the Boolean all default to...
  12. [SOLVED] ArrayLists - Getting index of parameters of objects of ArrayLists.

    I have this borderline difficult HW assignment that introduced ArrayLists about a lesson back from the one I am on now. Currently I am having difficulty doing something (and wording) to make the...
  13. [SOLVED] Re: Referencing to Method. Incompatible Types Error.

    EDIT: Fixed output too. The most obvious mistake I somehow managed to surpass took me almost 24 hours to notice...#-o
  14. [SOLVED] Re: Referencing to Method. Incompatible Types Error.

    Well, one thing I noticed is that I'm only supposed to have 5 private instance variables. I added 3 more to use for the mutator methods (which I need). I think somehow I'm supposed to build the...
  15. [SOLVED] Re: Referencing to Method. Incompatible Types Error.

    fillup[index].calcDistance(); didn't come up as an error and seemed to be a potential solution. But the thing is I have to go by certain guidelines. For example:


    for (int index = 0; index <...
  16. [SOLVED] Re: Referencing to Method. Incompatible Types Error.

    Dang, you guessed pretty good. Though that example is in 2 classes as well. I tried plainly making a separate statement in the main saying something like fillup.calcDistance(); but it didn't...
  17. [SOLVED] Re: Referencing to Method. Incompatible Types Error.

    I thought I did that with myDist = myEndMiles - myStartMiles; in the calcDist method. Sorry I can't think straight. I have been on this literally all day (:|.
  18. [SOLVED] Re: Referencing to Method. Incompatible Types Error.

    Hmm, well I edited
    distance[index] = fillup[index].calcDistance(); to say
    distance[index] = fillup[index].getDistance();.

    It compiled but my output numbers in the terminal are all F'd up....
  19. [SOLVED] Referencing to Method. Incompatible Types Error.

    I'm gonna come out straight, this is a homework assignment. I almost got it done, but there is one main issue keeping me from compiling and finishing this. I have two classes. One is a tester (main...
  20. Re: ...differ in length error; homework starter code not working.

    The goal of it is to calculate each planet in our solar system its surface gravity. Though, I'm not sure what double[] gravities = calcGravity(radii, masses); is supposed to be doing. I am supposed...
  21. ...differ in length error; homework starter code not working.

    This is NOT my code, but I'm supposed to use it to help me with completing the final thing. The problem is, when I compile it, I get an error saying that method calcGravity in class Gravity1 cannot...
  22. Re: Get user input of letters w/ numerical values, and straight numbers.

    Might have to go that route, though I am not familiar with a "switch statement".



    The data in the variables will just be used to compute an answer from hex to decimal, binary, and char, and...
  23. Re: Get user input of letters w/ numerical values, and straight numbers.

    Yes I am using the Scanner class to read.

    Those 10 variables are the only letters the user can enter, and any number. I chose those because they are necessary for Hexadecimal code lines, like...
  24. Re: Get user input of letters w/ numerical values, and straight numbers.

    *Sigh*, well I am trying to add a feature to a converter script of mine that also accepts Hexadecimal input and outputs it in decimal, binary, and text. There's not really any code that is causing...
  25. Re: Get user input of letters w/ numerical values, and straight numbers.

    I see, well now that I got that established, my other current major issues are numbered in my starting post...
Results 1 to 25 of 47
Page 1 of 2 1 2