I have a Matrix class that has the following attributes: number of Lines, number of columns and a matrix of Objects.
I have to find the minimum element of the matrix of Objects. How could I do that if I don't know what my Objects will be in JAVA?
You can use either the comparable or comparator functions to, effectively sort arrays of objects by a specific value. You will, depending override the compare to value and select an instance field to make comparisons with.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.