• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

separator of the File Class

 
Ranch Hand
Posts: 130
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 439
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Enthuware Software Support
Posts: 4810
52
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
reply
    Bookmark Topic Watch Topic
  • New Topic