Question: 3 points Widgets - Consider the following class definition. Which of the following best describes the soldSome method's level of access to the num Produced
3 points Widgets - Consider the following class definition. Which of the following best describes the soldSome method's level of access to the num Produced and numSold variables? * public class Widgets { private int numProduced; private static int numSold - 0; public Widgets (int numMade) { numProduced - numMade; } public static void soldSome(int n) { /* implementation not shown */ } } O Both numProduced and numSold can be accessed and updated. Both numProduced and numSold can be accessed, but only numProduced can be updated. Both numProduced and numSold can be accessed, but only numSold can be updated. numSold can be accessed but not updated; num Produced cannot be accessed or updated numSold can be accessed and updated; num Produced cannot be accessed or updated
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
