?? ??:
?? ??? n? ??? ??? ?? while ??? ???? ??? ???? ??? ?? ???? ?? ?? ???? ???. ?? ???? ?? ???? ?? ??? ?? ???? ??? ?? ??? ?? ??? ??? ?????.
??? ??? ????.
/** * 功能:產(chǎn)生min-max中的n個(gè)不重復(fù)的隨機(jī)數(shù) * * min:產(chǎn)生隨機(jī)數(shù)的其實(shí)位置 * mab:產(chǎn)生隨機(jī)數(shù)的最大位置 * n: 所要產(chǎn)生多少個(gè)隨機(jī)數(shù) * */ public static int[] randomNumber(int min,int max,int n){ //判斷是否已經(jīng)達(dá)到索要輸出隨機(jī)數(shù)的個(gè)數(shù) if(n>(max-min+1) || max <min){ return null; } int[] result = new int[n]; //用于存放結(jié)果的數(shù)組 int count = 0; while(count <n){ int num = (int)(Math.random()*(max-min))+min; boolean flag = true; for(int j=0;j<count;j++){ if(num == result[j]){ flag = false; break; } } if(flag){ result[count] = num; count++; } } return result; }
Java ?? ?? ??: Java ?? ??
Set? ??? ???? ??? ??? ? ????.
/** * 功能:隨機(jī)指定范圍內(nèi)N個(gè)不重復(fù)的數(shù) * * @param min 指定范圍最小值 * @param max 指定范圍最大值 * @param n 隨機(jī)數(shù)個(gè)數(shù) */ public static int[] randomSet(int min, int max, int n) { Set<Integer> set = new HashSet<Integer>(); int[] array = new int[n]; for (; true;) { // 調(diào)用Math.random()方法 int num = (int) (Math.random() * (max - min)) + min; // 將不同的數(shù)存入HashSet中 set.add(num); // 如果存入的數(shù)小于指定生成的個(gè)數(shù),則調(diào)用遞歸再生成剩余個(gè)數(shù)的隨機(jī)數(shù),如此循環(huán),直到達(dá)到指定大小 if (set.size() >= n) { break; } } int i = 0; for (int a : set) { array[i] = a; i++; } return array; }
?? ??? ??? Set? ?? ? ?????. ??? ?? ??? ??? ???? ?? ?? ??? ?????. ??? ?? ???? ??? ??? ??? ?????.
?? ?? ?? ?? ???: ?? ?? ??
? ??? Java?? ??? ?? ?? n?? ?? ??? ???? ??? ?? ?????. ??? ??? PHP ??? ????? ?? ?? ??? ?????!

? AI ??

Undress AI Tool
??? ???? ??

Undresser.AI Undress
???? ?? ??? ??? ?? AI ?? ?

AI Clothes Remover
???? ?? ???? ??? AI ?????.

Clothoff.io
AI ? ???

Video Face Swap
??? ??? AI ?? ?? ??? ???? ?? ???? ??? ?? ????!

?? ??

??? ??

???++7.3.1
???? ?? ?? ?? ???

SublimeText3 ??? ??
??? ??, ???? ?? ????.

???? 13.0.1 ???
??? PHP ?? ?? ??

???? CS6
??? ? ?? ??

SublimeText3 Mac ??
? ??? ?? ?? ?????(SublimeText3)

JDBC ????? ???? ????? ?? ?? ?? ??? ?? ?? ??? ?? ? ?? ??? ?? ?? ?? ??? ???????. 1. ????? ????? Conn.SetAutoCommit (False)?? ??????. 2. ??? ? ????? ?? ?? SQL ??? ?????. 3. ?? ??? ??? ?? Conn.commit ()?? ???? ??? ???? ???? ?? ??? ???? Conn.Rollback ()?? ??????. ???, ? ??? ???? ????, ??? ???? ????, ?? ??? ??? ?? ??? ??? ???? ? ???????. ?? ?? ?? ???? ????? ??? ???? ?? ?? ???? ???? ??? ????? ?? ??? ??? ? ?? ???? ?? ????.

?? ?? ? ?? ???? ???? ?? Java.Time ???? ???? ??????. 2. LocalDate, LocalDateTime ? LocalTime? ?? ?? ??? ??? ?????. 3. () ???? ???? ?? ??? ??? ????. 4. ???/???? ??? ???? ??? ????? ??? ??????. 5. ZonedDateTime ? Zoneid? ???? ???? ??????. 6. DateTimeFormatter? ?? ?? ? ?? ?? ?? ???; 7. ??? ?? ?? ?? ??? ????? ?? ??????. ?? Java? ?? ??? ???? ??? ??? ???? Java.Timeapi ??? ?? ??? ???????.

Pre-FormancetArtUptimeMoryUsage, Quarkusandmicronautleadduetocompile-timeprocessingandgraalvsupport, withquarkusoftenperforminglightbetterine serverless sinarios.2.thyvelopecosyste,

Java 's Garbage Collection (GC)? ???? ???? ???? ??????, ?? ? ??? ??? ? ??? ??? ??? ??? ????. 1.GC? ?? ?? (? : ?? ??, ?? ???, ?? ?? ?)?? ??? ???? ????, ?? ? ??? ??? ???? ?????. 2. ?? ???? ????? ????, ?? ?? ??? ??? ???? ?? ??? ??????. 3. ?? ?? ?? ?? : ??? ?? (Eden, S0, S1)? ?? ????? ?????. ??? ??? ?? ? MajorGC? ???? ? ??? ? ????. Metaspace? ??? ?? ???? ?????. 4. JVM? ??? GC ??? ?????. SerialGC? ??? ?? ????? ?????. ParallelGC? ???? ??????. CMS? ?? ???

GradleisBetTerChoiceFormostNewProjectSduetoitssuperiorflexible, Performance, and ModernToolingsupport.1.Gradle'Sgroovy/kotlindslismoreConcisENDEXPRESSIVETHANMAVEN'SVOSEXML.2.GradleOutsMaveninbuildweedweedweedweedweedweedweedweedweedweedweedweedweedweede

DEFER? ??? ???? ?? ??? ??? ???? ? ?????. ?? ??? ?? ? ? ?? ????, ??? ??? ? ?? ?? (LIFO)? ??? ?????. 1. ?? ??? ??? ? ??? ?????. 2. ?? ??? ?? ??? ??? ????? ?????. 3. ?? ? ?? ?? ??? ? ????. 4. ??? ?????? ??? ??? ???? ?????. 5. ?? ??? ???? ?? ??? ?? ??? ?????. ??? ??? ?? ?? ? ???? ???? ? ????.

??? htmlinput ??? ???? ??? ???? ????? ??? ??? ?? ??? ???? ???? ? ????. 1. ???, ???, ??, ?? ? ??? ?? ??? ??? ?? ?? ?? ??? ???? ???? ??? ? ???? ??? ? ????. 2. HTML5? ?????? ??? ? ?? ?? ??? ?? ? ??? URL, ??, ?? ? ??? ?? ??? ??? ??????. 3. ?? ?? ? ? ??? ??? ???? ?? ??? ???? ???? ?? ???? ?? ???? ???? ?? ? ? ??? ?? ???????.

GO? HTTP ?? ????? ?? ??, ??, ????? IP ? ?? ??? ?? ? ? ????. 1. http.handlerfunc? ???? ????? ????, 2. ??? ???? ?? ?? ??? ?? ??? ??????. ?? ?? ??? ???? ??? ?????? ??? ????? ???? ? ?????. ?? ???? ?? ?? ??, JSON ?? ?? ? ?? ID ??? ?????.
