I don't think
delete is a word in Java. When you try to delete the characters, you write:
CODE
delete c;
but the compiler will think that it's a variable declaration were
delete is the type and that
c is the name of the variable. It will issue an error (unless you really do have a class called "delete" in your program

).
You could, for each character, check to see if it is a '(' or ')', and if it isn't then you print it. For instance:
CODE
if (op == '(' || op == ')')
//Do nothing
else
System.out.println(op);
This approach doesn't really delete the characters, but it ignores them. If you really need to delete them, you can try some of the following:
If you want to store the output (e.g. in a String) rather than sending it to the screen, you should check out one overloaded method of the
String class:
substring().
The substring() method comes in two versions, this is what the
Java API specification says about these two methods:
QUOTE
substring(int beginIndex)
Returns a new string that is a substring of this string. The substring begins with the character at the specified index and extends to the end of this string.
QUOTE
substring(int beginIndex, endIndex)
Returns a new string that is a substring of this string. The substring begins at the specified beginIndex and extends to the character at index endIndex - 1. Thus the length of the substring is endIndex-beginIndex.
Example (also from the specification):
"hamburger".substring(4, 8) returns "urge"Again, we don't delete the character, but we create a new string that contains
all character except for the ')' or the '('. Sometimes it's a real pain that the String objects are immutable

.
If you have long expressions, the above method isn't really effective, because there will be a lot of copying, and you should look for other solutions. Another class that is great when analysing String objects is the
StringTokenizer class in the
java.util package. I encourage you to read about it, and that you can do
here.
You seem to know a lot about Java, so I figured that general guidelines would be a better way to help rather than just posting a complete solution. I hope they were usefull to you, if you're still having problems, just post here and we'll see what can be done.