public class ArryDemo02 {
public static void main(String args [])
{
int [] arr = {1,4,7,8,5}; //声明一个int类型的数组
for (int i = 0;i <=4;i++) //i表示的是数组的下标
{
arr[i] =arr[i] * 2 + 1;
}
for (int i = 0; i <= 4;i++)
{
System.out.println("arr["+i+"]="+arr[i]);
}
}