Question: Help with comment and explain what the beow Java code does and is it a constructor or method? or both? and explain @Override. Thanks! import
Help with comment and explain what the beow Java code does and is it a constructor or method? or both? and explain @Override. Thanks! import java.util.Scanner;
class Human extends Player
private Scanner scanner;
public HumanString name
supername;
scanner new ScannerSystemin;
@Override
public int makeMoveint currentSticks
System.out.printlnname enter number of sticks to take to currentSticks : ;
int sticks scanner.nextInt;
while sticks sticks currentSticks
System.out.printlnInvalid number of sticks. Try again: ;
sticks scanner.nextInt;
return sticks;
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
