Skip to content

Commit

Permalink
new blog added
Browse files Browse the repository at this point in the history
  • Loading branch information
lyrace committed Feb 26, 2022
1 parent 68cbd9c commit fca02c4
Show file tree
Hide file tree
Showing 51 changed files with 4,095 additions and 875 deletions.
26 changes: 22 additions & 4 deletions archives.fr/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -182,16 +182,34 @@
<h1>Archive</h1>
</header>
<div class="archive-year">
<h2 class="archive-year-header">2022<sup class="archive-count">&nbsp;&nbsp;24</sup>
<h2 class="archive-year-header">2022<sup class="archive-count">&nbsp;&nbsp;27</sup>
</h2>
<div class="archive-month">
<h3 class="archive-month-header">February<sup class="archive-count">&nbsp;&nbsp;9</sup></h3>
<h3 class="archive-month-header">February<sup class="archive-count">&nbsp;&nbsp;12</sup></h3>
<div class="archive-posts">
<div class="archive-entry">
<h3 class="archive-entry-title">Leetcode26
<h3 class="archive-entry-title">【Leetcode】283.移动零
</h3>
<div class="archive-meta"><span title='2022-02-26 18:01:08 +0800 CST'>February 26, 2022</span>&nbsp;·&nbsp;1 min&nbsp;·&nbsp;Theme PaperMod</div>
<a class="entry-link" aria-label="post link to 【Leetcode】283.移动零" href="https://lyrace.github.io/post/leetcode283/"></a>
</div>
<div class="archive-entry">
<h3 class="archive-entry-title">【Java笔记】17.接口
</h3>
<div class="archive-meta"><span title='2022-02-26 16:12:18 +0800 CST'>February 26, 2022</span>&nbsp;·&nbsp;3 min&nbsp;·&nbsp;Theme PaperMod</div>
<a class="entry-link" aria-label="post link to 【Java笔记】17.接口" href="https://lyrace.github.io/post/java17/"></a>
</div>
<div class="archive-entry">
<h3 class="archive-entry-title">【Java笔记】16.抽象类
</h3>
<div class="archive-meta"><span title='2022-02-26 14:55:37 +0800 CST'>February 26, 2022</span>&nbsp;·&nbsp;1 min&nbsp;·&nbsp;Theme PaperMod</div>
<a class="entry-link" aria-label="post link to 【Java笔记】16.抽象类" href="https://lyrace.github.io/post/java16/"></a>
</div>
<div class="archive-entry">
<h3 class="archive-entry-title">【Leetcode】26删除有序数组中的重复项
</h3>
<div class="archive-meta"><span title='2022-02-25 19:20:32 +0800 CST'>February 25, 2022</span>&nbsp;·&nbsp;1 min&nbsp;·&nbsp;Theme PaperMod</div>
<a class="entry-link" aria-label="post link to Leetcode26" href="https://lyrace.github.io/post/leetcode26/"></a>
<a class="entry-link" aria-label="post link to 【Leetcode】26删除有序数组中的重复项" href="https://lyrace.github.io/post/leetcode26/"></a>
</div>
<div class="archive-entry">
<h3 class="archive-entry-title">【Java笔记】15.final
Expand Down
26 changes: 22 additions & 4 deletions archives/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -182,16 +182,34 @@
<h1>Archive</h1>
</header>
<div class="archive-year">
<h2 class="archive-year-header">2022<sup class="archive-count">&nbsp;&nbsp;24</sup>
<h2 class="archive-year-header">2022<sup class="archive-count">&nbsp;&nbsp;27</sup>
</h2>
<div class="archive-month">
<h3 class="archive-month-header">February<sup class="archive-count">&nbsp;&nbsp;9</sup></h3>
<h3 class="archive-month-header">February<sup class="archive-count">&nbsp;&nbsp;12</sup></h3>
<div class="archive-posts">
<div class="archive-entry">
<h3 class="archive-entry-title">Leetcode26
<h3 class="archive-entry-title">【Leetcode】283.移动零
</h3>
<div class="archive-meta"><span title='2022-02-26 18:01:08 +0800 CST'>February 26, 2022</span>&nbsp;·&nbsp;1 min&nbsp;·&nbsp;Theme PaperMod</div>
<a class="entry-link" aria-label="post link to 【Leetcode】283.移动零" href="https://lyrace.github.io/post/leetcode283/"></a>
</div>
<div class="archive-entry">
<h3 class="archive-entry-title">【Java笔记】17.接口
</h3>
<div class="archive-meta"><span title='2022-02-26 16:12:18 +0800 CST'>February 26, 2022</span>&nbsp;·&nbsp;3 min&nbsp;·&nbsp;Theme PaperMod</div>
<a class="entry-link" aria-label="post link to 【Java笔记】17.接口" href="https://lyrace.github.io/post/java17/"></a>
</div>
<div class="archive-entry">
<h3 class="archive-entry-title">【Java笔记】16.抽象类
</h3>
<div class="archive-meta"><span title='2022-02-26 14:55:37 +0800 CST'>February 26, 2022</span>&nbsp;·&nbsp;1 min&nbsp;·&nbsp;Theme PaperMod</div>
<a class="entry-link" aria-label="post link to 【Java笔记】16.抽象类" href="https://lyrace.github.io/post/java16/"></a>
</div>
<div class="archive-entry">
<h3 class="archive-entry-title">【Leetcode】26删除有序数组中的重复项
</h3>
<div class="archive-meta"><span title='2022-02-25 19:20:32 +0800 CST'>February 25, 2022</span>&nbsp;·&nbsp;1 min&nbsp;·&nbsp;Theme PaperMod</div>
<a class="entry-link" aria-label="post link to Leetcode26" href="https://lyrace.github.io/post/leetcode26/"></a>
<a class="entry-link" aria-label="post link to 【Leetcode】26删除有序数组中的重复项" href="https://lyrace.github.io/post/leetcode26/"></a>
</div>
<div class="archive-entry">
<h3 class="archive-entry-title">【Java笔记】15.final
Expand Down
4 changes: 2 additions & 2 deletions categories/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -134,10 +134,10 @@ <h1>Categories</h1>

<ul class="terms-tags">
<li>
<a href="https://lyrace.github.io/categories/java/">java <sup><strong><sup>15</sup></strong></sup> </a>
<a href="https://lyrace.github.io/categories/java/">java <sup><strong><sup>17</sup></strong></sup> </a>
</li>
<li>
<a href="https://lyrace.github.io/categories/leetcode/">LeetCode <sup><strong><sup>9</sup></strong></sup> </a>
<a href="https://lyrace.github.io/categories/leetcode/">LeetCode <sup><strong><sup>10</sup></strong></sup> </a>
</li>
</ul>
</main>
Expand Down
6 changes: 3 additions & 3 deletions categories/index.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@
<link>https://lyrace.github.io/papermod-cover.png</link>
</image>
<generator>Hugo -- gohugo.io</generator>
<lastBuildDate>Fri, 25 Feb 2022 19:20:32 +0800</lastBuildDate><atom:link href="https://lyrace.github.io/categories/index.xml" rel="self" type="application/rss+xml" />
<lastBuildDate>Sat, 26 Feb 2022 18:01:08 +0800</lastBuildDate><atom:link href="https://lyrace.github.io/categories/index.xml" rel="self" type="application/rss+xml" />
<item>
<title>LeetCode</title>
<link>https://lyrace.github.io/categories/leetcode/</link>
<pubDate>Fri, 25 Feb 2022 19:20:32 +0800</pubDate>
<pubDate>Sat, 26 Feb 2022 18:01:08 +0800</pubDate>

<guid>https://lyrace.github.io/categories/leetcode/</guid>
<description></description>
Expand All @@ -22,7 +22,7 @@
<item>
<title>java</title>
<link>https://lyrace.github.io/categories/java/</link>
<pubDate>Fri, 25 Feb 2022 11:52:31 +0800</pubDate>
<pubDate>Sat, 26 Feb 2022 16:12:18 +0800</pubDate>

<guid>https://lyrace.github.io/categories/java/</guid>
<description></description>
Expand Down
79 changes: 41 additions & 38 deletions categories/java/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,47 @@
<h1>java</h1>
</header>

<article class="post-entry tag-entry">
<header class="entry-header">
<h2>【Java笔记】17.接口
</h2>
</header>
<section class="entry-content">
<p>接口 一、基本介绍 接口就是给出一些没有实现的方法,封装到一起,到某个类要使用的时候,再根据具体情况把这些方法写出来
interface 接口名{
​ //属性
​ //方法:抽象方法、默认实现方法或静态方法
}
class 类名 implements 接口{
​ // 自己的属性
​ // 自己的方法
​ // 必须实现的接口的抽象方法
}
jdk7前,接口的所有方法都没有方法体,即都是抽象方法;jdK8后接口可以有静态方法,默认方法,即接口中可以有方法的具体实现
public interface Inter { // 属性 public int n1 = 10; // 方法 // 接口中抽象方法可以省略abstract public void hi(); // jdk8后,可以有默认实现方法,使用default关键字实现 default public void ok(){ System.out.println(&#34;ok...&#34;); } // jdk8后,可以有静态方法 public static void cry(){ System.out.println(&#34;cry..&#34;); } } // 类实现一个接口,需要将该接口的所有抽象方法都实现 class A implements Inter{ @Override public void hi() { System....</p>
</section>
<footer class="entry-footer"><span title='2022-02-26 16:12:18 +0800 CST'>February 26, 2022</span>&nbsp;·&nbsp;3 min&nbsp;·&nbsp;Theme PaperMod</footer>
<a class="entry-link" aria-label="post link to 【Java笔记】17.接口" href="https://lyrace.github.io/post/java17/"></a>
</article>

<article class="post-entry tag-entry">
<header class="entry-header">
<h2>【Java笔记】16.抽象类
</h2>
</header>
<section class="entry-content">
<p>抽象类 一、介绍 当父类的某些方法需要声明,但又不确定如何实现时,将其声明为抽象方法,这个类就是抽象类
用abstract关键字修饰一个类时,这个类就叫抽象类
访问修饰符 abstract 类名{}
用abstract关键字来修饰一个方法时,这个方法就是抽象方法
访问修饰符 abstract 返回类型 方法名(参数列表); // 没有方法体
抽象类一般会被继承,其子类来实现抽象方法
二、注意事项 抽象类不能被实例化 抽象类不一定要包含abstract方法,即抽象类可以没有abstract方法,可以有实现的方法 一旦类包含了abstract方法,则这个类必须声明为abstract abstract只能修饰类和方法,不能修饰属性和其它的 抽象类可以有任意成员,比如非抽象方法、构造器、静态属性.. 抽象方法不能有主体,即不能实现 如果一个类继承了抽象类,则它必须实现抽象类的所有抽象方法,除非它自己也声明为abstract类 抽象方法不能使用private、final和static来修饰,因为这些关键字都是和重写相违背 public class Abstract01 { } abstract class H{ public abstract void hi(); // 抽象方法 } // 如果一个类继承了抽象类,则它必须实现抽象类的所有抽象方法,除非它自己也声明为abstract类 abstract class E{ public abstract void hi(); } abstract class F extends E{ } class G extends E{ @Override public void hi() { // 实现方法,有方法体就行 } } 三、抽象类实践——模板设计模式 3....</p>
</section>
<footer class="entry-footer"><span title='2022-02-26 14:55:37 +0800 CST'>February 26, 2022</span>&nbsp;·&nbsp;1 min&nbsp;·&nbsp;Theme PaperMod</footer>
<a class="entry-link" aria-label="post link to 【Java笔记】16.抽象类" href="https://lyrace.github.io/post/java16/"></a>
</article>

<article class="post-entry tag-entry">
<header class="entry-header">
<h2>【Java笔记】15.final
Expand Down Expand Up @@ -183,44 +224,6 @@ <h2>【Java笔记】13.代码块
<footer class="entry-footer"><span title='2022-02-22 15:30:06 +0800 CST'>February 22, 2022</span>&nbsp;·&nbsp;2 min&nbsp;·&nbsp;Theme PaperMod</footer>
<a class="entry-link" aria-label="post link to 【Java笔记】13.代码块" href="https://lyrace.github.io/post/java13/"></a>
</article>

<article class="post-entry tag-entry">
<header class="entry-header">
<h2>【Java笔记】12.main
</h2>
</header>
<section class="entry-content">
<p>main public static void main(String[] args){}
main方法由虚拟机调用
java虚拟机需要调用类的main()方法,该方法的访问权限必须是public
java虚拟机在执行main()方法时不必创建对象–&gt;该方法必须是static
该方法接收String类型的数组参数,该数组保存执行java命令时传递给所运行的类的参数
cmd中java 执行的程序 参数1 参数2 参数3… e.g.:java HelloWorld n1 n2 n3
args数组 第一个参数为n1 第二个参数为n2 第三个参数为n3
IDEA中传参数
main()方法中,可以直接调用main方法所在类的静态方法或静态属性,但不能访问该类中的非静态成员,必须创建该类的一个实例对象后,才能通过这个对象访问类中的非静态成员
</p>
</section>
<footer class="entry-footer"><span title='2022-02-22 09:28:56 +0800 CST'>February 22, 2022</span>&nbsp;·&nbsp;1 min&nbsp;·&nbsp;Theme PaperMod</footer>
<a class="entry-link" aria-label="post link to 【Java笔记】12.main" href="https://lyrace.github.io/post/java12/"></a>
</article>

<article class="post-entry tag-entry">
<header class="entry-header">
<h2>【Java笔记】11 类变量和类方法
</h2>
</header>
<section class="entry-content">
<p>类变量和类方法 一、类变量 1.1 什么是类变量 类变量也叫静态变量/静态属性,是该类的所有对象共享的变量,任何一个该类的对象访问时,取到的都是相同值,任何一个该类的对象去修改时,修改的也是同一个变量。
1.2 定义类变量 访问修饰符 static 数据类型 变量名;[推荐]
static 访问修饰符 数据类型 变量名;
1.3 访问类变量 类名.类变量名 或 对象名.类变量名
静态变量的访问修饰符的访问权限和范围和普通属性是一样的。
public class VisticStatic { public static void main(String[] args) { //类名.类变量名 //类变量随着类的加载而创建,没有创建对象实例也可以访问 System.out.println(A.name); A a = new A(); //对象名.类变量名 System.out.println(&#34;a.name=&#34; &#43; a.name); } } class A{ // 类变量的访问必须遵守访问权限 public static String name = &#34;lll&#34;; // 类变量 private int num = 10; // 普通属性/普通成员变量/非静态属性/非静态成员变量/实例变量 } 1....</p>
</section>
<footer class="entry-footer"><span title='2022-02-10 17:39:46 +0800 CST'>February 10, 2022</span>&nbsp;·&nbsp;2 min&nbsp;·&nbsp;Theme PaperMod</footer>
<a class="entry-link" aria-label="post link to 【Java笔记】11 类变量和类方法" href="https://lyrace.github.io/post/java11/"></a>
</article>
<footer class="page-footer">
<nav class="pagination">
<a class="next" href="https://lyrace.github.io/categories/java/page/2/">Next Page »</a>
Expand Down
37 changes: 36 additions & 1 deletion categories/java/index.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,42 @@
<link>https://lyrace.github.io/papermod-cover.png</link>
</image>
<generator>Hugo -- gohugo.io</generator>
<lastBuildDate>Fri, 25 Feb 2022 11:52:31 +0800</lastBuildDate><atom:link href="https://lyrace.github.io/categories/java/index.xml" rel="self" type="application/rss+xml" />
<lastBuildDate>Sat, 26 Feb 2022 16:12:18 +0800</lastBuildDate><atom:link href="https://lyrace.github.io/categories/java/index.xml" rel="self" type="application/rss+xml" />
<item>
<title>【Java笔记】17.接口</title>
<link>https://lyrace.github.io/post/java17/</link>
<pubDate>Sat, 26 Feb 2022 16:12:18 +0800</pubDate>

<guid>https://lyrace.github.io/post/java17/</guid>
<description>接口 一、基本介绍 接口就是给出一些没有实现的方法,封装到一起,到某个类要使用的时候,再根据具体情况把这些方法写出来
interface 接口名{
​ //属性
​ //方法:抽象方法、默认实现方法或静态方法
}
class 类名 implements 接口{
​ // 自己的属性
​ // 自己的方法
​ // 必须实现的接口的抽象方法
}
jdk7前,接口的所有方法都没有方法体,即都是抽象方法;jdK8后接口可以有静态方法,默认方法,即接口中可以有方法的具体实现
public interface Inter { // 属性 public int n1 = 10; // 方法 // 接口中抽象方法可以省略abstract public void hi(); // jdk8后,可以有默认实现方法,使用default关键字实现 default public void ok(){ System.out.println(&amp;#34;ok...&amp;#34;); } // jdk8后,可以有静态方法 public static void cry(){ System.out.println(&amp;#34;cry..&amp;#34;); } } // 类实现一个接口,需要将该接口的所有抽象方法都实现 class A implements Inter{ @Override public void hi() { System.</description>
</item>

<item>
<title>【Java笔记】16.抽象类</title>
<link>https://lyrace.github.io/post/java16/</link>
<pubDate>Sat, 26 Feb 2022 14:55:37 +0800</pubDate>

<guid>https://lyrace.github.io/post/java16/</guid>
<description>抽象类 一、介绍 当父类的某些方法需要声明,但又不确定如何实现时,将其声明为抽象方法,这个类就是抽象类
用abstract关键字修饰一个类时,这个类就叫抽象类
访问修饰符 abstract 类名{}
用abstract关键字来修饰一个方法时,这个方法就是抽象方法
访问修饰符 abstract 返回类型 方法名(参数列表); // 没有方法体
抽象类一般会被继承,其子类来实现抽象方法
二、注意事项 抽象类不能被实例化 抽象类不一定要包含abstract方法,即抽象类可以没有abstract方法,可以有实现的方法 一旦类包含了abstract方法,则这个类必须声明为abstract abstract只能修饰类和方法,不能修饰属性和其它的 抽象类可以有任意成员,比如非抽象方法、构造器、静态属性.. 抽象方法不能有主体,即不能实现 如果一个类继承了抽象类,则它必须实现抽象类的所有抽象方法,除非它自己也声明为abstract类 抽象方法不能使用private、final和static来修饰,因为这些关键字都是和重写相违背 public class Abstract01 { } abstract class H{ public abstract void hi(); // 抽象方法 } // 如果一个类继承了抽象类,则它必须实现抽象类的所有抽象方法,除非它自己也声明为abstract类 abstract class E{ public abstract void hi(); } abstract class F extends E{ } class G extends E{ @Override public void hi() { // 实现方法,有方法体就行 } } 三、抽象类实践——模板设计模式 3.</description>
</item>

<item>
<title>【Java笔记】15.final</title>
<link>https://lyrace.github.io/post/java15/</link>
Expand Down
Loading

0 comments on commit fca02c4

Please sign in to comment.