import java.util.Scanner;
      public class RemoveBracketsFromAnAlgebraicString {
      public static void main(String[] args) {
           Scanner sc = new Scanner(System.in);
           System.out.print("Enter Some Expression : ");
           String s = sc.nextLine();
           String result = s.replaceAll("[(){}]","");
           System.out.println("Expression without brackets : "+result);
        }
      }
      
      Java language logo

      Java program to remove brackets

      0

      0

      avatar
      drzyadav

      0 Comments

        Add Comment

        Log in to add a comment

        Codiga - All rights reserved 2022.