数组查找指定位置的元素

1 public class TestArray02{
2     public static void main(String[] args){
3         //查询指定位置的元素
4         //给定一个数组
5         int[] arr = {23,43,4453,3536};
6         //查找索引为2的位置上对应的元素
7         System.out.println(arr[2]);
8     }
9 }

 

posted @ 2021-12-05 10:53  当时只道是寻常呀  阅读(154)  评论(0)    收藏  举报