Bookmark Topic Watch Topic
  • New Topic

using an object in other class...

 
Pradeep Adibatla
Ranch Hand
Posts: 336
  • Mark post as helpful
  • send pies
  • Report post to moderator
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)

hmapA.put("1",ABC);
hmapA.put("2",XYZ);
hmapA.put("3",LMN);


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...

hMapB=classA.getHashA();


I am getting null in the above!
 
Embla Tingeling
Ranch Hand
Posts: 237
 
Campbell Ritchie
Sheriff
Pie
Posts: 49796
69
  • Mark post as helpful
  • send pies
  • Report post to moderator
Embla Tingeling wrote:Doubleposted
Thank you for noticing ( ). Closing thread.
 
    Bookmark Topic Watch Topic
  • New Topic