The following code is available:
package com.company; public class Main { public static void main(String[] args) { String[] arr = {"+5", "-3"}; int a = 0; for (int i = 0; i<arr.length; i++){ if (arr[i].contains("+")){ arr[i].replace('+',' '); } else if (arr[i].contains("-")){ arr[i].replace('-',' '); } System.out.print(arr[i]+" "); } } } The task of the program is the removal of the element of the array, the definition of the sign for the calculation and the subsequent calculation. a is the initial number. I did not find another way to remove +/-, after determining the sign, but this one does not work either. Where is the mistake?
