Ask Question
10 March, 11:44

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. 10 March, 12:05
    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?
Find 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 the answers seem to be not correct or there’s no answer. Try a smart search to find answers to similar questions.
Search for Other Answers