View Single Post
  #2 (permalink)  
Old 01-04-2008, 12:58 PM
tim's Avatar
tim tim is offline
Senior Member
 
Join Date: Dec 2007
Location: South Africa
Posts: 410
Rep Power: 3
tim is on a distinguished road
Default Accessors and Mutators
Hello Preethi.

I assume that List is a class defined by you. In the definition of your list class add a accessor and mutator (get and set methods) to you data structure. For example:
Code:
class List{
    private String[] data;
    public String[] getData(){
        return data;
    }
    public void setData(String[] data){
        this.data = data;
    }
}
Now you should be able to access the data by using the dot notation:
Code:
String record = list.getData();
Hope this helped.
__________________
Eyes dwelling into the past are blind to what lies in the future.

Last edited by tim; 01-04-2008 at 01:00 PM.
Reply With Quote