Inner Classes: using inner class in method