Following is a question from JQ+ Which of these statements about the constant named 'separator' of the File class are true? 1. It is of type char. 2. It is of type String. 3. It takes a value of '\' in Windows and '/' in Unix. 4. It is always of 1 char. 5. It can be of more than 1 character. I went for 2,3,5. But the correct answer is 2,3,4. In KAM, in the Review Questions he validates the option e) in Q18.2 saying that The separator can consist of more than one character. Since i could work on Windows or unix only, i couldn't try with other OS. Can any one help me. TIA
1. It is of type char. 2. It is of type String. 3. It takes a value of '\' in Windows and '/' in Unix. 4. It is always of 1 char. 5. It can be of more than 1 character. One is in correct it expects a String , 3 you already know and i don't think that other systems have more then one character representing a file separator.