Every array overrides one of methods defined in class Object. Which one?
Method clone is public in arrays, because arrays classes implement Cloneable. It uses the default implementation of clone() from class Object, so you will receive a shallow copy of array.

Follow CodeGalaxy

Mobile Beta

Get it on Google Play
Send Feedback
Keep exploring
Java quizzes
Sign Up Now
or Subscribe for future quizzes