> For the complete documentation index, see [llms.txt](https://mrparkonline.gitbook.io/guide-to-high-school-computer-science/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://mrparkonline.gitbook.io/guide-to-high-school-computer-science/beginner-programming-grade-10-to-11/java-essentials/collection/exercise-questions.md).

# Exercise Questions

{% embed url="<https://www.youtube.com/watch?v=NWaRIXnZsSA>" %}

1. **Vowel Counter**

Assume that only `"aeiou"` are your vowels, create a program that counts the number of vowels in a given String.

{% embed url="<https://www.youtube.com/watch?v=R35lncuOg8w>" %}

2. &#x20;**Palindrome Checker**

Write a program that checks if the given string is a [palindrome](https://www.google.com/search?q=define%3A+palindrome\&oq=define%3A+palindrome\&gs_lcrp=EgZjaHJvbWUyBggAEEUYOTIGCAEQRRg60gEIMjA1MWowajeoAgCwAgA\&sourceid=chrome\&ie=UTF-8\&safe=active\&ssui=on)**.** Assume that the string will only contain lowercase alphabetical characters.

{% hint style="info" %}
**Example:**

`tacocat` is a palindrome.&#x20;

`tacodog` is **not** a palindrome
{% endhint %}

{% embed url="<https://www.youtube.com/watch?v=HtzJHwCEz4w>" %}

3. **Sort an Array**

After creating a random array of integers, write a program that can sort it from least to greatest.

{% hint style="info" %}
**Example:**

`{3,1,4,1,5,9}` becomes `{1,1,3,4,5,9}`
{% endhint %}

{% embed url="<https://www.youtube.com/watch?v=ld59OBLhR-0>" %}

4. **List of Factors**

Create a program that creates an ArrayList of factors of a given inputted integer.

{% embed url="<https://www.youtube.com/watch?v=nGWHRM5cfis>" %}

5. **Remove Duplicates**

Create a program that analyzes an ArrayList of numbers and removes any duplicates within the list except for the very first occurrence of that value.
