You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Yes generics would have been more elegant. But i am wondering if there are any performance benefit that one has over the other? I need to research for a quick comparison between using Object class and using Generics.
I have never used Object and tbh, I don't think there is going to be any performance diff (I might be surprised) I think it is just more elegant because it is informing the developer about dynamically typed class.
I honestly don't know which one is a best practice. Personally, I feel like generics are more elegant but perhaps it is a topic we could ask in class.
So instead of using Object I would rather use a generic.
https://github.com/CS682-S22/dsd-pub-sub-project-anchitbhatia/blob/1cdf79e83816160c8ea636020afb70f7988ad19b/src/main/java/utils/Helper.java#L41
The text was updated successfully, but these errors were encountered: