Search:

Type: Posts; User: fakeClassy

Search: Search took 0.29 seconds.

  1. Replies
    4
    Views
    418

    Re: methods returning zero's ???

    Alright I think that'll get me on the right path - thanks
  2. Replies
    4
    Views
    418

    Re: methods returning zero's ???

    I thought the data i put in the employeeMain would go into those methods. I need to look back at my notes but, maybe I put a { after the method name to initialize?
  3. Replies
    4
    Views
    418

    methods returning zero's ???

    Will someone look at this and maybe give a pointer on why only zero's are being returned.

    public class employee {


    String name;
    int id;
    int salary;
    int age;
    String position;
  4. Re: thought i had it, then i sneezed and lost it (randomly generated numbers)

    But the 700 was figurative not literal, it was an example of an output from the randomly generated number line of code.
    I think this whole problem is how to randomly generate a number and then use...
  5. Re: thought i had it, then i sneezed and lost it (randomly generated numbers)

    I put in the
    int x = random+random;
    and the program worked but, the divide by 7... part of the code divided the randomly generated number plus itself as opposed to a new number created by two of...
  6. Re: thought i had it, then i sneezed and lost it (randomly generated numbers)

    I was given this problem "Write a program to randomly generate a 3-digit number N (it is ok if the number has
    fewer than 3 digits). Create a number NN which is N placed next to it. Example, if
    the...
  7. Re: thought i had it, then i sneezed and lost it (randomly generated numbers)

    If you could either hlp me with my errors or explain how to make it work, I would really appreciate it.
  8. Re: thought i had it, then i sneezed and lost it (randomly generated numbers)

    public static void main(String[] args) {

    int n = (int)Math.floor(Math.random()*1000+1);
    int random = n;
    int x = "random"+"random";
    System.out.println("n =" +n);...
  9. Re: thought i had it, then i sneezed and lost it (randomly generated numbers)

    can i convert the int to a string, and if i do can i still use it for the math op's? I keep trying and getting all sorts of errors - i can get the two n's to print next to each other but i can't...
  10. thought i had it, then i sneezed and lost it (randomly generated numbers)

    Hi - I am trying to learn java and have been given a code to randomly generate a number "n". I have been asked to do some math operations with nn (to be one copy of the randomly generated number...
Results 1 to 10 of 10