updated caps in java sample code. fixes #2524
Merge pull request #2562 from Jonahss/javaSamples1

updated caps in java sample code. fixes #2524