Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class MySubMax extends MyAbstractProcess {
- public static void main(String[] args) {
- new MySubMax().printValue();
- }
- public int action() {
- String x[] = readValues();
- int max = Integer.parseInt(x[0]);
- for (int i = 0; i < x.length; i++) {
- int currentNumber = Integer.parseInt(x[i]);
- if (max < currentNumber) {
- max = currentNumber;
- }
- }
- return max;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment