• 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
  • Ron McLeod
  • Paul Clapham
  • Devaka Cooray
  • Tim Cooke
Sheriffs:
  • Rob Spoor
  • Liutauras Vilda
  • paul wheaton
Saloon Keepers:
  • Tim Holloway
  • Tim Moores
  • Mikalai Zaikin
  • Carey Brown
  • Piet Souris
Bartenders:
  • Stephan van Hulst

File Object, Poddar Exam Q: 41

 
Ranch Hand
Posts: 81
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
In the following question:
Q41) What will be the output
Consider a directory structure like this (NT or 95)
C:\JAVA\12345.msg --FILE

The answer given is : d
d) \12345.msg
\
true
12345.msg
false
false
Shouldn't the isAbsolute method return false for Win 95, NT. That is what happens on my Win 98 machine with Java 2, sdk 1.3.
thanks,
Zulfiqar
PS: I edited it to format the code.
[This message has been edited by zulfiqar raza (edited October 19, 2000).]
[This message has been edited by zulfiqar raza (edited October 19, 2000).]
 
Ranch Hand
Posts: 63
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
But i get it as
\12345.msg
\
false
12345.msg
false
false
Mine is JDK1.2 running on Win98
Lakshmi
 
zulfiqar raza
Ranch Hand
Posts: 81
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yes, I get the same result. Like I stated the return value from isAbsolute() is false. So is the answer given incorrect?
I did look it up from Mughal/Rasmussen. It says that on Windows a path is absolute if the first character is \ or a drive letter precedes it e.g., C:\
In this case the first could be true. But the SDK return false.
Can anyone clarify?
thank you,
Zulfiqar.
 
Heroic work plunger man. Please allow me to introduce you to this tiny ad:
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic