Add Java annotation to code blocks in README files

This commit is contained in:
Wes Gilleland
2018-03-28 01:35:43 -04:00
parent 6879990857
commit 86ee59c232
13 changed files with 49 additions and 45 deletions

View File

@ -33,7 +33,7 @@ In short, it allows you to create a copy of an existing object and modify it to
In Java, it can be easily done by implementing `Cloneable` and overriding `clone` from `Object`
```
```java
class Sheep implements Cloneable {
private String name;
public Sheep(String name) { this.name = name; }
@ -48,7 +48,7 @@ class Sheep implements Cloneable {
Then it can be cloned like below
```
```java
Sheep original = new Sheep("Jolly");
System.out.println(original.getName()); // Jolly