This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes using an object in other class... Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Beginning Java
Reply locked New topic

using an object in other class...

Pradeep Adibatla
Ranch Hand

Joined: Oct 27, 2009
Posts: 336
In classA, hash map ,say I have 3 records like empNo,Employee

Now I need to get these 3 values in class B...

I wrote :---

HashA hmapA=new HashA<String,Emloyee> (having getters and setters)


In CLassB:-->

If I do ClassA classA =new ClassA();

// This would mean a new object isn't it?

I have HashB hMapB=new HAshB<String,Employee>

I wrote...


I am getting null in the above!
Embla Tingeling
Ranch Hand

Joined: Oct 22, 2009
Posts: 237
Campbell Ritchie

Joined: Oct 13, 2005
Posts: 38045
Embla Tingeling wrote:Doubleposted
Thank you for noticing ( ). Closing thread.
I agree. Here's the link:
subject: using an object in other class...
Similar Threads
Sorting arraylist on the basis of object
q rom
ArrayList confusion
Thread - Wait() and Notify();
Object is null