Task Cancellation

Task Cancellation
when i tried shutdown hook with anonymous class "Cannot refer to a non-final variable concourse inside an inner class defined in a different method " Error is showing.
So can i change concourse object in to Final ?