[Java daily question] 20170227, java20170227
20170224 for problem resolution, click "Java daily question" 20170227 "below today's question to view the problem (The problem is resolved at the beginning of the public account, public ID: weknow619)
Package Feb2017; import java. util. arrays; public class Ques0227 {public static int getMax (int [] data) {Arrays. sort (data. clone (); return data [data. length-1] ;}}
Today's question:
The above getMax method is to take the maximum value of the array. Why do we need to use data. clone to copy and then sort it? How can I solve the problem if I want to find the maximum number of shards (the maximum value may be multiple? (Click "[Java daily question] 20170227" below to view issue resolution 20170224)
Questions originally published on the public account and short book: [Java daily question] 20170227, [Java daily question] 20170227 (you can also scan the Avatar QR code to view)
The weknow team has activated the authentication and has answered questions. If you have any questions, you can also consult. Click the answer to find me !!