Java arraylist referencing between different classes?
-
I'm making an employee database program that reads a list of employee names, id number and so on but in my FileScanner class after i create the employee object i cant add it to my Emplist Arraylist declared as follows in another class: public ArrayList <Employee> Emplist = new ArrayList<Employee>(); I have tested the file scanner and it reads all the data fine, inserting the newly created employee in to my Emplist arraylist is my only problem. i need to reference Emplist(created in a different class) in my FileScanner class and im not sure how to do this
-
Answer:
You can't expect us to know what your problem is without showing your code. There a million things you could be doing wrong. And, that's why you didn't receive an answer. Post another topic with your code.
Dan at Yahoo! Answers Visit the source
Related Q & A:
- Why the same font in Java looks different?Best solution by Stack Overflow
- How to perform operation on Arraylist?Best solution by Stack Overflow
- When using Harvard Referencing?Best solution by Yahoo! Answers
- When did cruise ships stop having different classes?Best solution by Yahoo! Answers
- What are even classes and odd classes?Best solution by Yahoo! Answers
Just Added Q & A:
- How many active mobile subscribers are there in China?Best solution by Quora
- How to find the right vacation?Best solution by bookit.com
- How To Make Your Own Primer?Best solution by thekrazycouponlady.com
- How do you get the domain & range?Best solution by ChaCha
- How do you open pop up blockers?Best solution by Yahoo! Answers
For every problem there is a solution! Proved by Solucija.
-
Got an issue and looking for advice?
-
Ask Solucija to search every corner of the Web for help.
-
Get workable solutions and helpful tips in a moment.
Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.