Search:

Type: Posts; User: copeg

Search: Search took 0.10 seconds.

  1. Replies
    3
    Views
    3,528

    Re: Encapsulation question regarding ArrayLists

    By providing a public method to access a value in the array rather than the array itself, the client has no clue how the data is stored and thus the ArrayList is encapsulated: the client doesn't care...
  2. Replies
    3
    Views
    3,528

    Re: Encapsulation question regarding ArrayLists

    If I understand your question correctly, you don't want to have a method with returns the full arraylist for fear of that class modifying the list, but without it how can another class access its...
Results 1 to 2 of 2