Do you mean you need a program that can accept inputs in the style of your example and correctly determine the value?
I would separate the string on the mathmatical operators (+,-,x, /) and bracket, then use the BODMAS rule to figure out the order for which the operations take place.
But your question is unclear. Am I on the right track?

It is a matter of operator precidence. Multiplication and division are of equal precidence, as are addition and subtraction. Multiplication and division have higher precidence than addition or subtraction. Therefore, you must put the desired expressions inside parentheses. IE: (2*5/6+3-8*3/2) would be likely equivalent to ((2*5)/6)+3-((8*3)/2). Is this your intention? Other possibilities could be (2*(5/6))+((3-8)*(3/2)). There are other permutations that could be applied, and in most cases the results are very different.

hi! I want to create a procedure which execute given below query using dynamic sql. i am getting some error i.e. "Msg 156, Level 15, State 1, Line 1
Incorrect ...

public class Main {
public static void main(String[] args) {
long timeCheck;
long periodOfTime;
ScheduledExecutorService scheduler = Executors.newScheduledThreadPool(2);
long initialDelay = 0; // ...