Getting the concepts clear - static in java