Greed is not a theme in the Hobbit, however it is one of many themes in The Lord of the Rings.