Java Program Coding With Output Shaft