diff --git a/.classpath b/.classpath deleted file mode 100644 index 39abf1c..0000000 --- a/.classpath +++ /dev/null @@ -1,49 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/.project b/.project deleted file mode 100644 index ad9713e..0000000 --- a/.project +++ /dev/null @@ -1,34 +0,0 @@ - - - java - - - - - - org.eclipse.jdt.core.javabuilder - - - - - org.eclipse.m2e.core.maven2Builder - - - - - - org.eclipse.jdt.core.javanature - org.eclipse.m2e.core.maven2Nature - - - - 1617801945368 - - 30 - - org.eclipse.core.resources.regexFilterMatcher - node_modules|.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__ - - - - diff --git a/.settings/org.eclipse.jdt.apt.core.prefs b/.settings/org.eclipse.jdt.apt.core.prefs deleted file mode 100644 index d4313d4..0000000 --- a/.settings/org.eclipse.jdt.apt.core.prefs +++ /dev/null @@ -1,2 +0,0 @@ -eclipse.preferences.version=1 -org.eclipse.jdt.apt.aptEnabled=false diff --git a/.settings/org.eclipse.jdt.core.prefs b/.settings/org.eclipse.jdt.core.prefs deleted file mode 100644 index 1b6e1ef..0000000 --- a/.settings/org.eclipse.jdt.core.prefs +++ /dev/null @@ -1,9 +0,0 @@ -eclipse.preferences.version=1 -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 -org.eclipse.jdt.core.compiler.compliance=1.8 -org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled -org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning -org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=ignore -org.eclipse.jdt.core.compiler.processAnnotations=disabled -org.eclipse.jdt.core.compiler.release=disabled -org.eclipse.jdt.core.compiler.source=1.8 diff --git a/.settings/org.eclipse.m2e.core.prefs b/.settings/org.eclipse.m2e.core.prefs deleted file mode 100644 index f897a7f..0000000 --- a/.settings/org.eclipse.m2e.core.prefs +++ /dev/null @@ -1,4 +0,0 @@ -activeProfiles= -eclipse.preferences.version=1 -resolveWorkspaceProjects=true -version=1 diff --git a/.vscode/settings.json b/.vscode/settings.json deleted file mode 100644 index c5f3f6b..0000000 --- a/.vscode/settings.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "java.configuration.updateBuildConfiguration": "interactive" -} \ No newline at end of file diff --git a/src/main/java/com/zeekling/array/SortArray.java b/src/main/java/com/zeekling/array/SortArray.java index 4083fe1..b949649 100644 --- a/src/main/java/com/zeekling/array/SortArray.java +++ b/src/main/java/com/zeekling/array/SortArray.java @@ -2,38 +2,38 @@ package com.zeekling.array; public class SortArray { - public static void main(String[] args){ - int[] a={2,4,6,8,3,6,9,12}; - doSomething(a,0,a.length-1); - for(int i=0;i<=a.length-1;i++) - System.out.print(a[i]+" "); - } - private static void doSomething(int[] a,int start,int end){ - if(start=x){ - swap(a,i,j); + + private static int core(int[] a, int start, int end) { + int x = a[end]; + int i = start; + for (int j = start; j <= end - 1; j++) { + if (a[j] >= x) { + swap(a, i, j); i++;//交换了几次 } }//把最大的放到最后 - swap(a,i,end);//把最大的放到i的位置 + swap(a, i, end);//把最大的放到i的位置 return i; - } - - private static void swap(int[] a,int i,int j) - { - int tmp=a[i]; - a[i]=a[j]; - a[j]=tmp; } - + + private static void swap(int[] a, int i, int j) { + int tmp = a[i]; + a[i] = a[j]; + a[j] = tmp; + } + } diff --git a/src/main/java/com/zeekling/string/Pvf.java b/src/main/java/com/zeekling/string/Pvf.java index 7fea4ee..b589e5e 100644 --- a/src/main/java/com/zeekling/string/Pvf.java +++ b/src/main/java/com/zeekling/string/Pvf.java @@ -6,13 +6,14 @@ import java.util.List; public class Pvf { static boolean Paddy; - public static void main(String args[]){ + + public static void main(String args[]) { System.out.println(Paddy); - List Listlist1 = new ArrayList(); + List Listlist1 = new ArrayList(); Listlist1.add(0); List Listlist2 = Listlist1; System.out.println(Listlist1.get(0) instanceof Integer); System.out.println(Listlist2.get(0) instanceof Integer); } - + } diff --git a/src/main/java/com/zeekling/string/StringBuilderTest.java b/src/main/java/com/zeekling/string/StringBuilderTest.java index 2e58250..d3a4897 100644 --- a/src/main/java/com/zeekling/string/StringBuilderTest.java +++ b/src/main/java/com/zeekling/string/StringBuilderTest.java @@ -1,19 +1,20 @@ package com.zeekling.string; -public class StringBuilderTest { +public class StringBuilderTest { public static void main(String[] args) { - StringBuffer s1=new StringBuffer(10); - double x=2.0; - int y=4; x/=++y; - byte b = (byte)127; + StringBuffer s1 = new StringBuffer(10); + double x = 2.0; + int y = 4; + x /= ++y; + byte b = (byte) 127; System.out.println(b); System.out.println(x); s1.append("1234"); System.out.println(s1.length()); System.out.println(s1.capacity()); } - + } diff --git a/src/main/java/com/zeekling/url/UrlTest.java b/src/main/java/com/zeekling/url/UrlTest.java index 83c4e4c..456fbd7 100644 --- a/src/main/java/com/zeekling/url/UrlTest.java +++ b/src/main/java/com/zeekling/url/UrlTest.java @@ -6,10 +6,10 @@ import java.net.URL; public class UrlTest { public static void main(String[] args) throws MalformedURLException { - URL u1 =new URL("http://www.111.com"); + URL u1 = new URL("http://www.111.com"); System.out.println(u1); - URL u2 =new URL("https://www.baidu.com"); + URL u2 = new URL("https://www.baidu.com"); System.out.println(u2); } - + }