-
Help Debug
Someone plz help me debug this simple code
Code:
import java.util.Scanner;
class ReturnValue
{
public static void main (String[] args)
{
long timePeriodMinutes
long timestamp1, timestamp2;
System.out.println("Enter Two timestamps :");
Scanner keyboard = new Scanner(System.in);
timestamp1 = keyboard.nextLong();
timestamp2 = keyboard.nextLong();
System.out.println("Time in rounded minutes : "+timePeriodMinutes*(long timestamp1, timestamp2));
}
public*static*long*timePeriodMinutes*(long timestamp1, timestamp2)
{
double*times;
if*((timestamp1<0) || (timestamp2<0))
times*=*-1;
else
times = (timestamp1-timestamp2)/(1000 *60);
times = Math.abs(times);
times = Math.ceil(times);
return*times;
}
}
-
Finished debugging. Did you have a question?
And what is wrong with your other thread? http://www.java-forums.org/new-java/...-new-post.html
Just in case you are wondering why you get strange replies read this: http://www.catb.org/~esr/faqs/smart-...ons.html#intro
-
multi-post. Thread locked