I know There are different way of reprentation for Conversion of Association,Aggregation and composition in java. But when we convert them into code(java classes) they are all represented in same manner. Like Student taught by teacher which is association will be represented with Student class having instance variable of Class Teacher.
Department has professors which is aggregation will be also be represented with Department class having instance variable (array )of Class Professors.
University has departments which is composition will be also be represented with University class having instance variable (array )of Class department.
So all are reprented in same manner in terms of code. So what benefits terms Association,Aggregation and composition provide to developer?
You're missing part of the story with Composition. It mandates a couple of extra properties:
You're right that the association will manifest as a reference / collection of references in child & parent respectively. But the code must also enforce the rules above if it's to ensure Composition semantics are enforced.
As for Aggregation: I don't use it. The semantics are too loose and it offers no advantages over straight associations.
hth.