How to get Long Max Value
Hi All,
Hope someone can give a shot with this prob of mine..
I am trying to get the maximum value of long for the yielded millisecond(type long) using this statements..
Long ldg = new Long (trialTime.getTime());
long date = ldg.MAX_VALUE;
but i keep on getting the same output which is 9223372036854775807
am i doing it right? or is there a poitnm im missing at...
thanks in advance
[441 byte] By [
jovie] at [2007-9-26 1:35:54]

It was kind of difficult to understand the question here. Long.MAX_VALUE always returns the maximum long value possible. If you wanted to get the maximum value returned by several calls to trialTime.getTime(), you could use Math.max(long, long)
something like
long max = Long.MIN_VALUE;
and everytime you call trialTime.getTime(), do this
max = Math.max(max, trialTime.getTime());
this way max will always contain the maximum value returned by trialTime.getTime()
dunno if this answered your question at all.
audus at 2007-6-29 2:20:49 >
