From 68c69b3717976565333cc03e3f15ee919969656d Mon Sep 17 00:00:00 2001 From: Alex McGuire Date: Sun, 20 Mar 2016 12:55:05 +0000 Subject: [PATCH] Tutorial's Java example uses incorrect types `FlatBufferBuilder.createString` returns an int offset, not a string --- docs/source/Tutorial.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/source/Tutorial.md b/docs/source/Tutorial.md index 74941be8c..de1e9fd95 100644 --- a/docs/source/Tutorial.md +++ b/docs/source/Tutorial.md @@ -432,10 +432,10 @@ our `orc` Monster, lets create some `Weapon`s: a `Sword` and an `Axe`.
~~~{.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.