Code blocks

 

When you want to use code blocks, put 4 spaces on the top so that it will be recognized as a code block.

Another way to recognize the text as a code block is to surround the relevant text with " ``` ".When you want to use the code block style for part of a sentence, surround it with " ` " . It will be recognized as inline code.

 

Example

   package helloworld;

   

   public class Hello {

       public static void main(String[] args) {

           System.out.println("Hello World");

       }

   }

```

package helloworld;

 

public class Hello {

   public static void main(String[] args) {

       System.out.println("Hello World");

   }

}

```

`inline code`

 

Result


Screen_Shot_2018-04-06_at_3.18.34_PM.png

  

Was this article helpful?