added example Scanner, fixed Xlint warnings