This week's book giveaway is in the Agile forum.
We're giving away four copies of The Software Craftsman and have Sandro Mancuso on-line!
See this thread for details.
The moose likes Features new in Java 7 and the fly likes ArrayList Method Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Software Craftsman this week in the Agile forum!
JavaRanch » Java Forums » Java » Features new in Java 7
Reply locked New topic
Author

ArrayList Method

Sundarajan Srinivasan
Greenhorn

Joined: Apr 27, 2012
Posts: 8
The method in the ArrayList (removeRange(int fromIndex,int toIndex)) has a protected access. How to use it??
Mohamed Sanaulla
Saloon Keeper

Joined: Sep 08, 2007
Posts: 3121
    
  33

You have got an answer here. Please use the same thread for further discussions related to this query.


Mohamed Sanaulla | My Blog
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 19357
    
  10

Well, since the method is protected, that means that only subclasses of ArrayList and classes in the same package as ArrayList (java.util) can access it, right?

And you can't create a class in the java.util package. So that, as you can see, leaves only one possibility.
Martin Vajsar
Sheriff

Joined: Aug 22, 2010
Posts: 3681
    
  61

Please continue the discussion in the aforementioned thread.
 
Have you tried LearnNowOnline? http://www.learnnowonline.com/
 
subject: ArrayList Method