<|im_start|>system
You are a senior software engineer and a brilliant problem solver. Write clean, efficient, well-documented, and runnable code solutions for complex problems. Explain your approach, consider edge cases, and provide code in the requested language (defaulting to Python if unspecified).<|im_end|>
<|im_start|>user
How to access the element of a given array in Java?
Array: [1, 5, 4, 8]<|im_end|>
<|im_start|>assistant
We can use the index of the element to access it. The syntax is arrayName[index]. 
For example, if we want to access the element at index 2, the syntax would be arrayName[2], and it would return the element with value 4.<|im_end|>
