Search:

Type: Posts; User: JohnJohnson123

Search: Search took 0.09 seconds.

  1. [SOLVED] Re: Put a random number from one vector to another

    It seems that #13 was correct. Thanks for your help and patiance.:)
  2. [SOLVED] Re: Put a random number from one vector to another

    I'm wondering. Is this something to build on...

    I'll have to ''build'' the methods again...but than again the other stuff I got is trash...



    public class Sample1{

    //public class Sample1...
  3. [SOLVED] Re: Put a random number from one vector to another

    I'm lost...



    public class Permexamp1{

    //Reading the vector with StdIn
    public static int [] getUserInput(int N)
    {
    //int N = args.lenght;
  4. [SOLVED] Re: Put a random number from one vector to another

    I tried some changes at the bottom, I tried changing the sequence of the creation of the arrays. With the input {2,2,2,2} the program prints out:0
    ...
  5. [SOLVED] Re: Put a random number from one vector to another

    I'm thinking...two things perhaps I can ''ask'' first for N and then do system out print to ask for M. Or keep the code that I've got[ain't that just the code of my dreams...hahah] and create N...
  6. [SOLVED] Re: Put a random number from one vector to another

    I think the problem is that I'm not thinking this correctly. If I put for example 5 and 2 in command line the vectora.length(N) is 5. Then the program starts to parse(move) 5 and 2 into vectora but...
  7. [SOLVED] Re: Put a random number from one vector to another

    Thanks man.

    That goes a long way.

    I still get this error message. I'll look in tomorrow.

    >java Permexamp 5 2
    Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 2
    ...
  8. [SOLVED] Re: Put a random number from one vector to another

    I don't get it. How do I make it public? (Do you put it like that?)
  9. [SOLVED] Re: Put a random number from one vector to another

    Example values: Well the Vectora is supposed to be larger, because that is the array wich M is suppose to read from. So N>M, hopefully. I tried with 5 and 2 from the command line, nothing happened,...
  10. [SOLVED] Put a random number from one vector to another

    I have a problem with this code. The program is supposed to read a vector with Standard Input and choose randomly from that vector, put those numbers in another array and then print that array out....
Results 1 to 10 of 10