1public static int[] numbers()
2{
3int[] arr={5,6,7,8,9}; //initializing array
4return arr;
5}
1import java.util.Arrays;
2
3public class trial1{
4
5 public static void main(String[] args){
6 int[] B = numbers();
7 System.out.println(Arrays.toString(B));
8 }
9
10 public static int[] numbers(){
11 int[] A = {1,2,3};
12 return A;
13 }
14}
15