Skip to content

Instantly share code, notes, and snippets.

@deepakmehra10
Created September 3, 2019 05:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save deepakmehra10/5b30b0c8b7954887edcedb5727711422 to your computer and use it in GitHub Desktop.
Save deepakmehra10/5b30b0c8b7954887edcedb5727711422 to your computer and use it in GitHub Desktop.
List students = Arrays.asList("Deepak", "Bhawna", "Charmy", "Vinisha");
// Create a Pvector collection.
PVector pVector1 = TreePVector.from(students);
PVector rahul = pVector1.plus("Rahul");
System.out.println(pVector1); // Output - [Deepak, Bhawna, Charmy, Vinisha]
System.out.println(rahul); // Output - [Deepak, Bhawna, Charmy, Vinisha, Rahul]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment