Ask Question
13 February, 02:00

Create a public non-final generic class called Some, which stores a single instance of the parameterized type. Your constructor should take a single instance of the parameterized type and save it. You should also provide getValue and setValue methods that allow the saved value to be retrieved or modified. As usual, your class should not expose any of its state publicly. Note that you may not be able to complete this home

+1
Answers (1)
  1. 13 February, 02:18
    0
    See explaination

    Explanation:

    public class Some {

    private T value;

    public Some (T value) {

    this. value = value;

    }

    public T getValue () {

    return value;

    }

    public void setValue (T value) {

    this. value = value;

    }

    }
Know the Answer?
Not Sure About the Answer?
Get an answer to your question ✅ “Create a public non-final generic class called Some, which stores a single instance of the parameterized type. Your constructor should take ...” in 📙 Computers & Technology if there is no answer or all answers are wrong, use a search bar and try to find the answer among similar questions.
Search for Other Answers