added example 6
added java license for some examples