public class main { public static void main(String[] args) { int[] A=new int[10]; Scanner in=new Scanner(System.in);// for(int i=0;i<10;i++)// { // A[i]=in.nextInt();// } int[] B={4,-2,3,4,-5,-6,1,-8,-9,2}; main a=new main(); System.out.println(a.max(B, 10)); }/* * @param A * @param n * @return */public int max(int[] A,int n){ int k=1; int end=A[0]; int sum=A[0]; int m=0; int nn=0; for(int i=0;iend) { end=sum; m=i; nn=j; } System.out.print("子数组为["); for(int p=m;p