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

@ -34,7 +34,7 @@ Wikipedia says
Translating our weapon example from above. Here we have the `Weapon` hierarchy
```
```java
public interface Weapon {
void wield();
void swing();
@ -109,7 +109,7 @@ public class Hammer implements Weapon {
And the separate enchantment hierarchy
```
```java
public interface Enchantment {
void onActivate();
void apply();
@ -155,7 +155,7 @@ public class SoulEatingEnchantment implements Enchantment {
And both the hierarchies in action
```
```java
Sword enchantedSword = new Sword(new SoulEatingEnchantment());
enchantedSword.wield();
enchantedSword.swing();