Definition format of anonymous inner class

Anonymous inner class
1. Conditions of use: If the implementation class of the interface or the subclass of the parent class only needs to be used only once, then the definition of the class can be omitted and the anonymous inner class can be used instead

2. Definition format:
interface name object name=new interface name(){ overwrite and rewrite all abstract methods };//(don’t forget the semicolon) 3. The format of anonymous internal classes: "new interface name(){,, ,,};" The resolution new represents the action of creating an object. The interface name is which interface the anonymous inner class needs to implement {,,,,} is the anonymous inner class 4. Notes on using anonymous inner classes Anonymous inner classes are created when objects are created Can only be used once. If you want to create an object multiple times and the content of the anonymous inner class is the same, the implementation class is defined separately.


The blue part is called anonymous inner class







An anonymous inner class is used and an anonymous object is also used; but the anonymous object can only be called once when the method is called.
Insert picture description here

R0cHM6Ly9ibG9nLmNzZG4ubmV0L0NaSExOTg==,size_16,color_FFFFFF,t_70)https://img-blog.csde_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L0NaSExOTg==,size_16,color_FFFFFF,t_70)]

Function shortcut

Undo: Ctrl/Command+ Z
Redo: Ctrl/Command+ Y
Bold: Ctrl/Command+ B
Italic: Ctrl/Command+ I
Title: Ctrl/Command+ Shift+ H
Unordered list: Ctrl/Command+ Shift+ U
Ordered list: Ctrl/Command+ Shift+ O
Check list: Ctrl/Command+ Shift+ C
Insert code: Ctrl/Command+ Shift+ K
Insert link: Ctrl/Command+ Shift+ L
Insert picture: Ctrl/Command+ Shift+ G
Find: Ctrl/Command+ F
Replace: Ctrl/Command+G

Reasonable creation of headings is helpful for the creation of the catalog

Enter it directly once #and press spaceit to generate a level 1 heading.
Enter it twice #and press spaceit to generate a level 2 heading.
By analogy, we support level 6 headings. It helps to TOCgenerate a perfect table of contents after using the syntax.

How to change the style of text

Emphasized text emphasized text

Bold text bold text

Markup text

Delete text

Quoted text

H 2 O is liquid.

The result of the 2 10 operation is 1024.

Insert link and image

Link: link .

image: Alt

Picture with dimensions: Alt

Centered picture: Alt

Centered and dimensioned pictures: Alt

Of course, in order to make it more convenient for users, we have added the image drag and drop function.

How to insert a beautiful piece of code

Go to the blog settings page, choose a code piece highlighting style you like, the same highlighting is shown below 代码片.

// An highlighted block
var foo = 'bar';

Generate a list that suits you

  • project
    • project
      • project
  1. Item 1
  2. Item 2在这里插入代码片
  3. Item 3
  • Scheduled Tasks
  • mission accomplished

Create a table

A simple table is created like this:

project Value
computer $1600
Cell phone $12
catheter $1

Setting content is centered, left, right

Use :---------:centered
using :----------left home
use ----------:right of abode

first row The second column Third column
The first column of text is centered The second column of text is right The third column of text is left

SmartyPants

SmartyPants converts ASCII punctuation characters into "smart" printed punctuation HTML entities. E.g:

TYPE ASCII HTML
Single backticks 'Isn't this fun?' ‘Isn’t this fun?’
Quotes "Isn't this fun?" “Isn’t this fun?”
Dashes -- is en-dash, --- is em-dash – is en-dash, — is em-dash

Create a custom list

Markdown
Text-to- HTML conversion tool
Authors
John
Luke

How to create a footnote

A text with footnotes. 1

Comments are also essential

Markdown converts text to HTML .

KaTeX math formula

You can use KaTeX to render LaTeX mathematical expressions :

The Gamma formula shows Γ (n) = (n − 1)! ∀ n ∈ N \Gamma(n) = (n-1)!\quad\forall n\in\mathbb NΓ ( n )=(n1)!nN is through Euler integral

Γ ( z ) = ∫ 0 ∞ t z − 1 e − t d t   . \Gamma(z) = \int_0^\infty t^{z-1}e^{-t}dt\,. Γ ( z )=0tz1etdt.

You can find more information about LaTeX mathematical expressions here .

New Gantt chart function to enrich your articles

Mon 06 Mon 13 Mon 20 已完成 进行中 计划一 计划二 现有任务 Adding GANTT diagram functionality to mermaid
  • About Gantt syntax, reference here ,

UML diagram

You can use UML diagrams for rendering. Mermaid . For example, a sequence diagram produced below:

张三 李四 王五 你好!李四, 最近怎么样? 你最近怎么样,王五? 我很好,谢谢! 我很好,谢谢! 李四想了很长时间, 文字太长了 不适合放在一行. 打量着王五... 很好... 王五, 你怎么样? 张三 李四 王五

This will produce a flowchart. :

Flowchart flow chart

We will still support the flow chart of flowchart:

Created with Raphaël 2.2.0 开始 我的操作 确认? 结束 yes no
  • About Flowchart flowchart syntax, reference here .

Export and import

Export

If you want to try this editor, you can edit this article at will. When you have finished writing an article, found in the toolbar at the top articles exported , generating a .md file or .html file is stored locally.

Import

If you want to load a .md file that you have written, you can select the import function in the upper toolbar to import the file with the corresponding extension, and
continue your creation.


  1. Explanation of footnotes ↩︎

Guess you like

Origin blog.csdn.net/CZHLNN/article/details/103104249