The Java TM Tutorial

| Start of Tutorial > Start of Trail > Start of Lesson | Search

Trail: Learning the Java Language
Lesson: The Nuts and Bolts of the Java Language

## 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`.

| Start of Tutorial > Start of Trail > Start of Lesson | Search