What is the ‘formal’ name of a list that has only one element?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Java
Collectionscalls this a singleton list, although I don’t think this is a formal name.public static List singletonList(T o) Returns an immutable list containing only the specified object. The returned list is serializable.
I much prefer “single element list”.
Edit: It appears that singleton is a valid mathematical term for a single element set.