sorry it didnt come out properly
My name Guru,
Could you tell me your code
the one for my bank account? didn't think so.
otherwise, what code are you requesting in this thread?
if it's free java code you're after, you might first want to check the forum rules, before you get the feeling that people are rude towards you
this is my code am not sure whats wrong with it its not printing the name,how much,the hour in/out,the minute in/out and not letting me do anything just says this and its supposed t obe in java
Exception in thread "main"
----jGRASP wedge2: exit code for process is 1.
----jGRASP: operation complete.
public class PublicGarage
public static void main(String  main)
char repeat; //To hold Y,y,N,v,C,c,V,v
double hour = 0.0; //To hold hours between 0-23
double minute = 0.0; //To hold minutes between 0-59
double cost = 0.0;
String customerName; //To hold input
Scanner keyboard=new Scanner(System.in);
System.out.printf("Type of vehicle? C for Car, V for Van");
System.out.printf("Enter arrival hour(0-23)");
System.out.printf("\nEnter arrival minute(0-59)");
System.out.printf("\nEnter exit hour(0-23)");
System.out.printf("\nEnter exit minute(0-59)");
System.out.println("Your charge is" + cost);
double totalTime = ( hour * 60.0 ) + minute;
if( totalTime >= 514 ) // more than 8.57 hours
cost = 30.0;
else if( totalTime < 514 && totalTime > 0)
cost = 3.50 * totalTime; // 3.50 per hour
if( totalTime >= 600) // more than 10 hours
cost = 20.0;
else if( totalTime < 600 && totalTime > 0)
cost = 2.00 * totalTime; // 2.00 per hour
System.out.println("Enter y for a new customer or N to stop");
while(choice=='Y' || choice=='y')
Edited 4 Years Ago
by mike_2000_17: Fixed formatting
Is that code in a file called "PublicGarage.java"? This is just a class path issue or a file naming issue.
Try compiling your program with "-classpath" keyword.
javac -classpath <classpath> PublicGarage.java
I Developed application in C# with crystal reports and created setup file in third party (Advance) Installer.When i installed my application on client system application is working but ...
I can't slove this problem
my code print nothing
what's wrong with it ??
#define total 1000
int weight (char word[total])
int i; ...
When using fgets to read from stdin how do you stop reading from stdin?