Win a copy of Java Concurrency Live Lessons this week in the Threads forum!
    Bookmark Topic Watch Topic
  • New Topic

ArrayList Method  RSS feed

 
Sundarajan Srinivasan
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Report post to moderator
The method in the ArrayList (removeRange(int fromIndex,int toIndex)) has a protected access. How to use it??
 
Mohamed Sanaulla
Bartender
Posts: 3169
34
Google App Engine Java Ruby
  • Mark post as helpful
  • send pies
  • Report post to moderator
You have got an answer here. Please use the same thread for further discussions related to this query.
 
Paul Clapham
Sheriff
Posts: 22185
38
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Report post to moderator
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
Posts: 3752
62
Chrome Netbeans IDE Oracle
  • Mark post as helpful
  • send pies
  • Report post to moderator
Please continue the discussion in the aforementioned thread.
 
    Bookmark Topic Watch Topic
  • New Topic
Boost this thread!