Search:

Type: Posts; User: cosecant

Search: Search took 0.24 seconds.

  1. Re: Project - Manipulating ArrayList (Union, Intersect, etc)

    Mistakes i noted:
    1. your union function is wrong. no items are ever added to result. an easy way to do it would be to have result contain the same contents of elements and then add items from s if...
  2. Replies
    5
    Views
    344

    [SOLVED] Re: Trouble with my while loop

    masterhand,
    ilan is correct. What you have written is for the while loop to run if at least one of them is under 100.
    You want it to terminate when one goes over, so you check if both are under 100.
  3. Replies
    16
    Views
    10,174

    Re: ArrayList Problem

    try:

    int rand=(int)(Math.random()*ArrayListName.size());
    System.out.println(ArrayListName.get(rand));
  4. Replies
    13
    Views
    1,062

    Re: Not sure what type of variable to use.

    You just need a non-static final variable.
  5. Replies
    6
    Views
    1,540

    Re: Overriding methods declaration problems

    IB's void M doesn't really override IA's void M because IB's method restricts the arguments to only ID's so ID is different from IC. Therefore void M would be an overloaded method.
  6. Thread: Box Set

    by cosecant
    Replies
    5
    Views
    784

    Re: Box Set

    I have use multiple for loops, but i have had trouble getting it to print the middle line for example
    I have been able to print(for ex.f) ffffff and ffffff eeeee dddd ccc bb a, but i cannot figure...
  7. Replies
    14
    Views
    4,269

    Re: help!! quadratic program

    Use following code


    Scanner keyb = new Scanner(in);
    int a = keyb.nextInt();
    int b = keyb.nextInt();
    int c = keyb.nextInt();
    double d = pow(b,2);
    double f = sqrt(d-(4*a*c));
    double g =...
  8. Thread: Box Set

    by cosecant
    Replies
    5
    Views
    784

    Re: Box Set

    You input a letter. Then you print it its place in the alphabet time(for example b would be bb).
    Then you print it again and then add the letter before it, its corresponding position number of...
  9. Thread: Box Set

    by cosecant
    Replies
    5
    Views
    784

    Box Set

    How do you print such problem?

    Enter a letter
    Ex. f

    ffffff
    ffffff eeeee
    ffffff eeeee dddd
    ffffff eeeee dddd ccc
    ffffff eeeee dddd ccc bb
Results 1 to 9 of 9