I am getting an error when I run my program in PuTTY but not in Eclipse. I have looked around online to try and find an answer to my issue, but have not been able too.
error:
dataSummary.java.227: inconvertible types
found: java.lang.Object
required: int
int contractIDDisplay = (int) int intr.next();
^
1 error
and here is the code:
Iterator itr = set.iterator();
while (itr.hasNext())
{ //while
int contractIDDisplay = (int) itr.next();
if (contractIDDisplay == 1)
{
System.out.printf("%d, %d, %d, %d",contractIDDisplay, monthCounter1, firstDate1, lastDate1);
file.format(contractIDDisplay + ", " + monthCounter1 + ", " + firstDate1 + ", " + lastDate1 + ", ");
}
There is more code before and after the these lines, however I do not think those lines are important. If they are please let me know. "set" is a Set.
Why would Eclipse be able to run my code and PuTTY not? Is there a way I can work around this issue if it cannot be fixed?