Respuesta :

Answer:

Following are the code to the given question:

public class Main//defining class Main

{

public static void main(String[] abv)//defining main method

{

   int nums[]={11,36,31,-2,11,-6};//defining an integer array nums

   System.out.print("{");//print bracket

   for(int i=0;i<nums.length;i++)//defining for loop to print value

   {

       System.out.print(nums[i]+",");//print array values

   }

   System.out.print("}");//print bracket

}

}

Output:

{11,36,31,-2,11,-6,}

Explanation:

In this code, a class Arr is declared that uses the main method, and inside the main method, an integer array nums are declared, which initializes the integer values and uses the for loop to print the initialized values with the curly bracket to prints value between them.