<|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
Add a feature to the given code to print the name of the largest number in an array.
int[] arr = {5,3,7,2,4};
int largest = arr[0];
for (int i = 1; i < arr.length; i++){
  if(arr[i] > largest){
    largest = arr[i];
  }
}<|im_end|>
<|im_start|>assistant
int[] arr = {5,3,7,2,4};
int largest = arr[0];
String name;
for (int i = 1; i < arr.length; i++){
  if(arr[i] > largest){
    largest = arr[i];
    name = Integer.toString(arr[i]);
  }
}
System.out.println("The largest number is " + name);<|im_end|>
