Posts
 
Reputation
Joined
Last Seen
0 Reputation Points
Unknown Quality Score

No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.

~685 People Reached
Favorite Forums
Favorite Tags
java x 11

6 Posted Topics

Member Avatar for emcee123
Member Avatar for beforetheyknew

Why don't you just use the package ...... import java.text.NumberFormat; then use this in the body....... NumberFormat money = NumberFormat.getCurrencyInstance(); lastly print out in the body ....... System.out.println(money.format(dollars)); Idk if this is what you were looking for, but this is a very simple version of getting the 2 decimal places.

Member Avatar for cale.macdonald
0
66
Member Avatar for Nightryno

Sigh, if you want the whole code, ask for it...Since it's pretty long. But this is HOW to solve it. I'm sure you can follow this to find the answer. [CODE] main() Prompt the user for a number while (number != -1) { if (isValidNumber(number)) { getLetterGrade(number) Display message with …

Member Avatar for GTJava
0
165
Member Avatar for deadllama19

Try using multiple methods... and make sure your LOGIC makes sense (Write it out and make sure it makes sense before you go into coding). If you post your code I can help.

Member Avatar for GTJava
0
102
Member Avatar for GTJava

Hey, getting a new error in my code... Its almost done, cant figure out what is wrong with this. ERROR: non-static method isPrime(int) cannot be referenced from a static context [CODE] import java.util.Scanner; public class primenumbertest { public boolean isPrime(int x){ int divisor = 1; do{ divisor += 1; } …

Member Avatar for GTJava
0
151
Member Avatar for GTJava

[CODE] import java.util.Scanner; public class primenumbertest { public boolean isPrime(int num){ int x; Scanner input = new Scanner(System.in); System.out.print("Enter a number to find out if it's prime or not (greater than 1): "); num = input.nextInt(); if (num == 2) return true; // check for divisible by all even number …

Member Avatar for GTJava
0
122

The End.