Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

separator of the File Class

 
natarajan meghanathan
Ranch Hand
Posts: 130
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Val Dra
Ranch Hand
Posts: 439
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Paul Anilprem
Enthuware Software Support
Ranch Hand
Posts: 3712
10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The given answer is correct. You might want to confirm the answer using the API.
HTH,
Paul.
------------------
Get Certified, Guaranteed!
(Now Revised for the new Pattern)
www.enthuware.com/jqplus
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic