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).]
lakshmi nair
Ranch Hand
Joined: Oct 11, 2000
Posts: 63
posted
0
But i get it as \12345.msg \ false 12345.msg false false Mine is JDK1.2 running on Win98 Lakshmi
zulfiqar raza
Ranch Hand
Joined: Oct 18, 2000
Posts: 81
posted
0
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.