??? ? ?? ??:
1. ?? ?? ??? ??? ???.
2. ???? ??? ???? ??? ??? ????.
1, 1+2+3+…+nimport java.util.Scanner;
public class Recursion {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
int n = in.nextInt();
System.out.println(sum(n));
}
public static int sum(int n) {
if(n == 1) {
return n;
}
else {
return n + sum(n-1);
}
}
}
(?? ??:
java ??? ????)import java.util.Scanner;
public class Recursion {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
int n = in.nextInt();
System.out.println(multiply(n));
}
public static int multiply(int n) {
if(n == 1) {
return n;
}
else {
return n*multiply(n-1);
}
}
}
?? ? ??? ?? 1??, ? ?? ???? ? ??? ?? ? ??? ?? ????. ?: 1, 1, 2, 3, 5, 8,…
import java.util.Scanner; public class Recursion { public static void main(String[] args) { Scanner in = new Scanner(System.in); int n = in.nextInt(); System.out.println(fun(n)); } public static int fun(int n) { if (n <= 2) { return 1; } else { return fun(n-1) + fun(n-2); } } }4. ?? ?? ??(?, ??, ?)
import java.util.Arrays;
import java.util.LinkedList;
public class MyBinaryTree {
//二叉樹節(jié)點
private static class TreeNode{
int data;
TreeNode leftChild;
TreeNode rightChile;
public TreeNode(int data) {
this.data = data;
}
}
//構(gòu)建二叉樹
public static TreeNode createBinaryTree(LinkedList<Integer> inputList) {
TreeNode node = null;
if(inputList == null || inputList.isEmpty()) {
return null;
}
Integer data = inputList.removeFirst();
//如果元素為空,則不再遞歸
if(data != null){
node = new TreeNode(data);
node.leftChild = createBinaryTree(inputList);
node.rightChile = createBinaryTree(inputList);
}
return node;
}
//前序遍歷:根節(jié)點,左子樹,右子樹
public static void preOrderTraveral(TreeNode node) {
if (node == null) {
return;
}
System.out.println(node.data);
preOrderTraveral(node.leftChild);
preOrderTraveral(node.rightChile);
}
//中序遍歷:左子樹,根節(jié)點,右子樹
public static void inOrderTraveral(TreeNode node) {
if(node == null) {
return;
}
inOrderTraveral(node.leftChild);
System.out.println(node);
inOrderTraveral(node.rightChile);
}
//后序遍歷:左子樹,右子樹,根節(jié)點
public static void postOrderTraveral(TreeNode node) {
if (node == null) {
return;
}
postOrderTraveral(node.leftChild);
postOrderTraveral(node.rightChile);
System.out.println(node.data);
}
public static void main(String[] args) {
LinkedList<Integer> inputList = new LinkedList<Integer>(Arrays.asList(new Integer[]{3,2,9,null,null,10,null,null,8,null,4}));
TreeNode treeNode = createBinaryTree(inputList);
System.out.println("前序遍歷:");
preOrderTraveral(treeNode);
System.out.println("中序遍歷:");
inOrderTraveral(treeNode);
System.out.println("后序遍歷:");
postOrderTraveral(treeNode);
}
}
?? ?? ???? ??:
? ??? ?? ?? ???? ??? ?? ?????. ??? ??? 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,

NetworkPortSandfirewallsworkTogetToenableCommunication whileensuringsecurity.1.networkportSarevirtualendpointsnumbered0–65535, Withwell-nownports like80 (http), 443 (https), 22 (ssh) ? 25 (smtp) ?? (specservices

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

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

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

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