Ask Question
22 July, 06:12

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

+4
Answers (1)
  1. 22 July, 08:31
    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 and Technology if you're in doubt about the correctness of the answers or there's no answer, then try to use the smart search and find answers to the similar questions.
Search for Other Answers