Search:

Type: Posts; User: TommyFiz

1. Thread: Calculate primes help

by TommyFiz
Replies
3
Views
1,244

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. Thread: Calculate primes help

by TommyFiz
Replies
3
Views
1,244

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. Thread: MORE java homework help.

by TommyFiz
Replies
10
Views
1,542

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. Thread: MORE java homework help.

by TommyFiz
Replies
10
Views
1,542

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. Thread: MORE java homework help.

by TommyFiz
Replies
10
Views
1,542

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. Thread: MORE java homework help.

by TommyFiz
Replies
10
Views
1,542

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. Thread: Error in printing method as always it prints the last value

by TommyFiz
Replies
6
Views
724

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. Thread: Error in printing method as always it prints the last value

by TommyFiz
Replies
6
Views
724

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. Thread: Error in printing method as always it prints the last value

by TommyFiz
Replies
6
Views
724

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. Thread: Homework problem (scanner problems)

by TommyFiz
Replies
2
Views
1,522

Re: Homework problem (scanner problems)

Awesome that worked. Thanks for the fast reply!
11. Thread: Homework problem (scanner problems)

by TommyFiz
Replies
2
Views
1,522

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