[ILUG] OTish: Java stuff, Can I pick a brain or two
Frank Murphy
frankly3d at gmail.com
Tue Dec 9 22:39:19 GMT 2008
Have the following snippet of code:
String StampDutyRate;
double SellingPrice;
Scanner input = new Scanner(System.in);
System.out.println();//This type of code just creates a blank
line in the screen output, to make reading the screen output easier.
//Input the users Selling Price using Scanner
System.out.println("Please enter your properties Selling Price
EUR " );//Any code in Green Colour will appear on screen
SellingPrice = input.nextDouble();
System.out.println();
System.out.println("Your Selling Price EUR " + SellingPrice );
//This shows the entered EUR value
System.out.println();
//Calculate the Stamp Duty Rate using the "if" then "else"
conditional Statement
I have tried a number of ways to get "SellingPrice =
input.nextDouble();" to appear on the same line on screen as
"System.out.println("Please enter your properties Selling Price EUR "
);"
like ---Screen---
Please enter your properties Selling Price EUR *someuserinput*
(someuserinput is just by way of explanation)
but keep getting syntax errors.
Is it doable|?
Frank
PS: Compiled of Fedora 10, openjdk and BlueJ
--
aMSN: Frankly3D
More information about the ILUG
mailing list