Tutorial's Java example uses incorrect types

`FlatBufferBuilder.createString` returns an int offset, not a string
This commit is contained in:
Alex McGuire 2016-03-20 12:55:05 +00:00
parent 91c27148c0
commit 68c69b3717
1 changed files with 2 additions and 2 deletions

View File

@ -432,10 +432,10 @@ our `orc` Monster, lets create some `Weapon`s: a `Sword` and an `Axe`.
</div>
<div class="language-java">
~~~{.java}
String weaponOneName = builder.createString("Sword")
int weaponOneName = builder.createString("Sword")
short weaponOneDamage = 3;
String weaponTwoName = builder.createString("Axe");
int weaponTwoName = builder.createString("Axe");
short weaponTwoDamage = 5;
// Use the `createWeapon()` helper function to create the weapons, since we set every field.