Cognizant Interview Question

Draw certain pattern in java, oops concept