Professional Documents
Culture Documents
int - id
String - name
String - creationDate
Create a constructor which takes all parameters in the above sequence. The
constructor should set the value of attributes to parameter values inside the
constructor.
sortMailBoxById(MailBox[] objArray)
The method will sort the array based on id and return the sorted array.
for(MailBox mailbox:objArray){
System.out.println(mailbox.getId()+" " + mailbox.getName()+" " +
mailbox.getCreationDate()+" ");
}
}}
Output
Displaying contents of array:
29 dyifepd avfznpr
73 kdqktps glwiegn
77 qjftnil fbigazj
87 njhzbtc orcmqza
95 ukeadms egndouz