Search:

Type: Posts; User: TommyFiz

Search: Search took 0.21 seconds.

  1. Replies
    3
    Views
    2,240

    Re: Calculate primes help

    I read a lot about that, and I feel like since we haven't learned about it, that's not what is expected in the program. My algorithm may not be the most efficient, but it seems like it should make...
  2. Replies
    3
    Views
    2,240

    Calculate primes help

    I'm getting the following error. The idea is to have the user input a number, and then print out all the primes less than the number.


    Enter a value:
    9
    Exception in thread "main"...
  3. Replies
    10
    Views
    2,438

    Re: MORE java homework help.

    Today in class I was wondering why he STILL wasn't talking about arrays and the assignment was due on Friday, and I found out I actually skipped a chapter and just assumed we were supposed to do the...
  4. Replies
    10
    Views
    2,438

    Re: MORE java homework help.

    Sorry, I forgot to attach code


    while(!"quit".equals(input)){
    System.out.println("Please enter a name: ");
    personName[x] = keyboard.nextLine();
    input = personName[x];
    if(input ==...
  5. Replies
    10
    Views
    2,438

    Re: MORE java homework help.

    I tried to understand what you were saying, and this is where I'm at now. I haven't got as far as making another class, thats going to be a whole nother story.

    Anyways, why isn't the if statement...
  6. Replies
    10
    Views
    2,438

    MORE java homework help.

    The goal for this project was to allow a user to input the name and age of a person, as many times as they want, until they type "quit". After they type quit, the program is to print the name and...
  7. Re: Homework help... beginning classes

    Dalisra, thank you! Removing static from my variables worked perfectly.

    I didn't quite understand your explanation of fixing the formula at the end, but the assignment states "assuming all...
  8. Re: Homework help... beginning classes

    Thanks for that! No, I do see why, but that isn't the problem in this case. Well, it may be ONE problem, but not THE problem. When I run the program I make sure to enter different ages, and it's...
  9. Error in printing method as always it prints the last value

    I'm having another problem with a homework assignment. We have to have 2 classes, one has the main program and the other has all the methods for the data received in the first class. Here is what I...
  10. Replies
    2
    Views
    2,292

    Re: Homework problem (scanner problems)

    Awesome that worked. Thanks for the fast reply!
  11. Replies
    2
    Views
    2,292

    Homework problem (scanner problems)

    I'm supposed to create a program that Asks for 3 names, as well as their age. It should ask one name, then their age, then the next and so on. When I compile this program, here is what happens.

    ...
Results 1 to 11 of 11