Looking at the answers to this question (link: How do I convert from int to Long in Java?), I used the following to compare long values (newUpdate, lastUpdate) with int value (Interval)
if ((newUpdate - lastUpdate) > Long.valueOf(interval))
I am not able to compile. What is the correct way to compare two different types?
More Info:
[INFO] Trace org.apache.maven.BuildFailureException: Compilation failure [145,51] operator > cannot be applied to long,java.lang.Long
Interval is of the type int
.