In the explanation of the question, in one place it reads:
Path getName(int index)
The index parameter is the index of the name element to return... The element that is farthest from the root has index count -1.
In another place it reads:
If you pass a negative index (to Path.getName( ))... java.lang.IllegalArgumentException is thrown.
Don't these two explanations contradict each other?
			
			
									
									
						About Question enthuware.ocpjp.v8.2.1570 :
Moderator: admin
- 
				eddie3
 - Posts: 14
 - Joined: Sat Dec 17, 2016 10:17 pm
 - Contact:
 
- 
				eddie3
 - Posts: 14
 - Joined: Sat Dec 17, 2016 10:17 pm
 - Contact:
 
Re: About Question enthuware.ocpjp.v8.2.1570 :
Is this question going to get answered?
			
			
									
									
						- 
				admin
 - Site Admin
 - Posts: 10443
 - Joined: Fri Sep 10, 2010 9:26 pm
 - Contact:
 
Re: About Question enthuware.ocpjp.v8.2.1570 :
There is no contradiction. Please read it carefully. It says, "count -1" not just -1. e.g. if the total number of elements in a path is 10, then the index of the farthest element from root is 10 - 1 i.e. 9.
			
			
									
									
						Who is online
Users browsing this forum: No registered users and 19 guests