answer : D
A canonical pathname is both absolute and unique. That means it includes getting absolute path and no removing redundant names (normalization).
ABC doesn't include both those operations. D includes it with file.getCanonicalPath();
D is correct
The file object is created using the filename variable.The getCanonicalPath() method is called on the file object to get the canonical path of the file.The canonicalPath variable is then used to create a new FileInputStream object.
This code will ensure that the path name is validated and canonicalized before the file is read.
This section is not available anymore. Please use the main Exam Page.1z0-819 Exam Questions
Log in to ExamTopics
Sign in:
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.
Upvoting a comment with a selected answer will also increase the vote count towards that answer by one.
So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.
ASPushkin
10 months, 1 week agod7bb0b2
11 months, 3 weeks agoAshan_Ozlov
1 year, 3 months agoStavok
1 year, 5 months agoKiraguJohn
1 year, 5 months ago