Parenthesis Checking Code

Hi Friends …. happy to see again
i made a code of  Parenthesis Checking it’s order is of the order is only O(n)
see this code and enjoy really …….     cc Arun Kumar Gupta Only.

import java.util.*;
import java.lang.*;
import java.io.*;

public class Stack
 {
public static void main (String [] args)
{
Scanner sc = new Scanner(System.in);
System.out.println(“Entere Combination”);
String Input = sc.next();

System.out.println(“Entered Values \t” + Input);
int len =Input.length();
char[] iArray = Input.toCharArray();
String cArray[] = new String[len];
for(int j = 0 ; j < len ; j++)
{

cArray[j] =Character.toString(iArray[j]) ;
}
int l =0, m=0 ,u =0;
int ru = 0, rm= 0, rl = 0 ;
String upper1 = “[” ;
String middle1 = “{” ;
String lower1 = “(” ;
String upper2 = “]” ;
String middle2 = “}” ;
String lower2 = “)” ;
for(int j = 0 ; j < len ; j++)
{
System.out.print(“\t”+cArray[j]);
}
System.out.print(“\n”);
for(int j = 0 ; j < len ; j++)
{
//System.out.print(“\t”+cArray[j]);
if(cArray[j].equals(upper1))
{
//System.out.print(“i am here [“);
++u;
ru = 1;
rm= 0;
rl =0;
}
if(cArray[j].equals(middle1))
{
++m;
rm =1;
ru = 0;
rl = 0;

}
if(cArray[j].equals(lower1))
{
++l;
rl =1;
ru = 0;
rm = 0;
}
if(cArray[j].equals(upper2))
{
u = u-1;
if((rm == 0) && (rl == 0))
{
ru= 0;
}
}
if(cArray[j].equals(middle2))
{
m = m-1;
if((ru == 0) && (rl == 0))
{
rl = 0;
}
}
if(cArray[j].equals(lower2))
{
l = l-1;
if((rm == 0) && (ru == 0))
{
rl = 0;
}
}



}
System.out.println(” Count Upper   :” +u+”\n” );
System.out.println(” Count Middle   :” +m+ “\n”);
System.out.println(” Count Lower   :” +l+ “\n”);
if((u == 0)&&(m ==0)&&(l ==0))
{
System.out.println(“Everything is ok !!!! No error”);
}
else
System.out.println(“Some Error is there “);

}

}