staticintfindMaxSum(int arr[],int n){int[][]dp=newint[n][2];//dp[i][0] means not use current data//dp[i][1] means use current datadp[0][0]=0;dp[0][1]=arr[0];for(int i=1;i<n;i++){dp[i][0]=Math.max(dp[i-1][1],dp[i-1][0]);dp[i][1]=dp[i-1][0...