Thanks mate :P Have fun at school
Type: Posts; User: macko
Thanks mate :P Have fun at school
press the thanks button under my post =P will feel much at home watching it add up hehe.. Plus this is 1 problem i beat kevin to :$
import java.text.DecimalFormat;
import java.util.Scanner;
public class Casting {
public static void main(String[] orcs) {
DecimalFormat df = new DecimalFormat("#.#");
DecimalFormat...
Try this:
import java.text.DecimalFormat;
import java.util.Scanner;
public class Casting {
oh wait..
double finalValue = number2 / number1;
Sorry no space is to be put inbetween number & 1 .....
replace old line with this 1 ive posted..
What's the problem exactly please?
That's because when you initialize a double its got to be 0.0 not 0....
double number1 = 0;
double number2 = 0;
CORRECT:
double number1 = 0.0;
import java.util.Scanner;
public class Casting {
public static void main(String[] orcs) {
DecimalFormat df = new DecimalFormat("#.#");
double number1 = 0;
double number2 = 0;
DecimalFormat df = new DecimalFormat("#.#");
df.format(value[0]);