apostolos kikirikou wrote:I have typed an example with differences in days between 2 days.I get errors on Print in stream methods.The method is undefined for the method print Stream.
If i delete my typed statements and paste those from the example 's source code the errors disappear .Or i have to folllow Eclipse to rename to PrintIn.
There is no such method as PrintIn. You can look at the java
API to see what methods do and don't exist.
If you are trying to print some text to the screen,
you should use
System.out.println()
Note: the LOWERCASE 'p'. also, it is a LOWERCASE 'l' (the letter between k and m), not an uppercase "I". It stands for something line "print with a new line".
This is a textbook case of why you should compile more often. Personally, I would have compiled after writing the first print statement. If it worked, great, I'd then add the next one. If it didn't, I'd fix it, only having to worry about ONE error. Then I'd use what I learned, and not make the same mistake on the next statement.
yes, it can be a slow, painful process. I can't tell you how many times I made the semi-colon-on-my-for-line-mistake:
This will not print ten lines, but one. The error is subtle, and I made it over and over. But once I REALLY learned it, I never made it again.