@@ -0,0 +1,640 @@
+import java.io.*;%0Aimport java.util.*;%0Aimport java.text.*;%0Aimport java.math.*;%0Aimport java.util.regex.*;%0A%0Apublic class JavaSubArray %7B%0A%0A    public static void main(String%5B%5D args) %7B%0A        /* Enter your code here. Read input from STDIN. Print output to STDOUT. Your class should be named Solution. */%0A        Scanner in = new Scanner(System.in);%0A%09%09int n=in.nextInt(), counter=0, arr%5B%5D = new int %5Bn%5D;%0A%09%09for (int i=0;i%3Cn;i++) %7B %0A%09%09%09if ((arr%5Bi%5D=in.nextInt())%3C0) counter++; %0A%09%09%7D%0A%09%09for (int i=0;i%3Cn;i++) %7B%0A%09%09%09int sum=arr%5Bi%5D;%0A%09%09%09for (int j=i+1;j%3Cn;j++) %7B%0A%09%09%09%09sum+=arr%5Bj%5D;%0A%09%09%09%09if (sum %3C 0) counter++;%0A%09%09%09%7D%0A%09%09%7D%0A%09%09System.out.println(counter);%0A    %7D%0A%7D%0A

Create JavaSubArray.java