Previous

Platform-Specific Details: Running the countChars Method

UNIX
% java Count testing
Counted 44 chars.
DOS shell (Windows 95/NT)
C:\> java Count testing
Counted 45 chars.
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: \n. In Windows 95/NT, it's two: \r\n.


Previous