But in my program even if I did not call them is still can display the data I entered..is that ok with out calling the..


If you think that is is correct according to your requirements then fine by me. But you have only one array for the names, what about the others?


I only need one array ,I just use getters and setters...for me to enter alot of data in an array...what im asking do i really need to call..when i use getters and setters


In previous posts I showed how to use one array and input multiple values:

add(String name, int age, ....) {
  EmployeeRecord er = new EmployeeRecord();
  er.setName(name); ....

  array[count] = er;


array[count] = new EmployeeRecord();


It is based on the correct code you posted that had 2 classes. One class is the object EmployeeRecord and the other your main method in which you will define the array as explained

Edited by javaAddict: n/a


how should I set the data being entered by the user in main...please give an example how..

And what have I been doing in the last posts?
All that code and examples aren't they enough?

You have your main; you are already reading the data from the keyboard; and setting them to the array. The examples given answer exactly your questions. It is not as if I do not want to answer your question because I already have answered it. I even implemented one of the methods (add) for you, and told you how to do the others. Posting the same code and giving the same explanations is a waste of time. My time.

Votes + Comments
WOW. That's even more than impressive. I think, this is the best example of patience, that I've ever seen. You'd be a great teacher ;)
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.