Given:
Which two methods modify field values? (Choose two.)
Given:
Which two methods modify field values? (Choose two.)
The methods that modify field values are setAllCounts and setGCount. The setGCount method takes an integer argument and assigns its value to the gCount field. It then returns the value of the gCount field. The setAllCounts method takes an integer argument and assigns its value to aCount, tCount, and cCount fields using chained assignment. It also calls the setGCount method with the argument, which assigns the value of the argument to the gCount field.
C,D only, setTcount() not modified field because set the same t parameter of class this.t = t (tricky), IF this method recive a a int parameter it so then modified value
C. setAllCounts and D. setGCount. The setGCount method takes an integer argument g and assigns its value to the gCount field. It then returns the value of the gCount field. The setAllCounts method takes an integer argument x and assigns its value to the aCount, tCount, and cCount fields using chained assignment. It also calls the setGCount method with the argument x, which assigns the value of x to the gCount field.
Answer is C,D setAllCounts and setGCount