Below is the question from a core java interview. Could somebody please help me?

There are designation and employee objects.

Designation                Employee
                           Designation object --> Designation object is in employee

ArrayList<employee> emptemp = new ArrayList<employee>();
emptmp.add(R1);
emptmp.add(R2);
..
..
..

Now we need to write an helper class or utility class which returns a 2 dimesional collection which displays the employees gorup by designation.

A good place to start would be to declare a suitable "2 dimensional collection". Once you know what looks like you can think about how to populate it.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.