Converting pseudocode for max subarray into working Java code
Your translation is pretty faithful to the already low-level pseudocode but you could:


The pseudocode talks about an array of numbers and not integers, but that is just a simple type change, and doesn't affect the logic at all
copy array.length into variable n near the top, and use n throughout as the original code does,
remove the initial filling of S with 0's, since your first loop will overwrite them anyway (and that was not in the original code)
change max to m, and array to A, but you could argue this makes your code more readable


This probably isn't the point of the exercise, but it is possible to solve this problem with a single loop that scans through the array just once, for a more efficient solution.