Note: The program gives different results for different platforms because the program counts new line characters. On UNIX, a new line is a single character:
- UNIX
% java Count testing Counted 44 chars.- DOS shell (Windows 95/NT)
C:\> java Count testing Counted 45 chars.\n
. In Windows 95/NT, it's two:\r\n
.