Search:

Type: Posts; User: SupportIsPower

Search: Search took 0.36 seconds.

  1. Replies
    7
    Views
    543

    Re: Dice score program

    I'm pretty sure the for loop will roll the dice and extra time, so if diceCount was 4, it would roll 5 times because you put less than OR equal to diceCount, it should only be less then. The...
  2. Re: I need help with removing arrays or hiding them.

    Why do you have an array that stores 1 number?
  3. Replies
    7
    Views
    543

    Re: Dice score program

    So basically you want to make a class that simulates a dice being rolled?

    I think you're overcomplicating the whole thing, it doesn't have to be as complicated as you make it out to be, just think...
  4. Replies
    7
    Views
    1,970

    Re: College Assignment please help

    Ohh sorry, I'm very new to this forum and I thought "spoonfeeding" was okay. It won't happen again, as of this point.
  5. Re: Please help me write two very simple programs

    If you want me to explain and write those programs for you, please add my email and we'll go on Teamviewer in which I can explain each line to you while writing it. For my email, PM me.
  6. Replies
    7
    Views
    1,970

    Re: College Assignment please help

    Alright I know I'm kind of late, but I just did this assignment yesterday, didn't find it very difficult.


    package AircraftSeats;

    import java.util.Scanner;
    import java.util.LinkedList;
    ...
  7. Replies
    2
    Views
    275

    Re: hi, I need help for this code ...

    Just use something like this:


    public static void main(String args[]){
    Scanner input = new Scanner(System.in);
    System.out.println("Enter the destination file name");
    String dest =...
  8. Replies
    2
    Views
    333

    Re: Literation Code

    Yeah I don't really understand what you're trying to do either. Please elaborate more.
  9. Re: where to put the nodes into the array?

    Honestly, I think it is the same problem. Same type of problem, and same user who's posting it.
  10. Replies
    4
    Views
    684

    Re: I/O List.java

    Instead of using arrays, try using a LinkedList:


    LinkedList<Integer> numbers1 = new LinkedList<Integer>();
    LinkedList<Integer> numbers2 = new LinkedList<Integer>();

    while(true){...
  11. Re: Random Number Generator Always gives 0

    Why don't you just:


    int number = 1+new Random().nextInt(56);


    Seems alot simpler, doesn't it?
  12. Replies
    0
    Views
    509

    Game Ideas...

    Uhm, I know this might be the wrong place for a question like this, but I couldn't find any type of threads that suited the question I'm about to ask as much as this one. So, the question is:
    I'm...
  13. Re: where to put the nodes into the array?

    You need to add some methods if you physically want to keep track of all the Nodes. First of all, you need a LinkedList which accepts Nodes' so you can keep track of every single node and a variable...
  14. Re: Reading ints into a multidimensional array

    There's a different between the methods '.next()' and '.nextLine()'. "Next" only reads up until a space a line break occurs, next line keeps reading until the file has ended. What you wanna do is...
  15. Replies
    7
    Views
    384

    Re: String Arrays []

    String input = new Scanner(System.in).next();
    boolean contains = false;
    for(String w : words){
    if(input.equalsIgnoreCase(w)){
    contains = true;
    break;
    }
    }
    if(contains){...
  16. Replies
    3
    Views
    2,021

    [SOLVED] Re: Linked List (adding alphabetically)

    If you want a collection that automatically sorts it in alphabetical order each time you add a new element to the list, try using a TreeSet. ( TreeSet<String> treeset = new TreeSet<String>(); ) Each...
  17. Re: BlueJ trouble or program trouble (Combining Arraylists)

    If you wanna merge 2 lists, why dont you just use:
    Collections.copy(destinationList, sourceList);
  18. Re: Initializing and Receiving Variables, Creating Methods

    In your for loop, "count" & "quantity" is not initialized.
  19. Replies
    2
    Views
    234

    Re: Help With errors. Please.

    Well, what are you trying to do in the first place? It'd be a lot more helpful if we knew the reason behind what the code actually does.
    EDIT: And well, line 53 just sets each element to "Random",...
  20. Re: Creating object everytime object is called

    I'm not really sure what you're trying to say, but if you're saying something like keeping track of ALL the Employee objects which are created, then you can use a list. Something like this:


    ...
Results 1 to 20 of 20