hello all

i m trying for java code to convert binary to decimal
I hv written this code but it is not working

import java.util.*;

public class BinaryToDec
{
public static void main(String args[])
{
int sum = 0;

for (int i=0;i<args[0].length;i++)
{
char c = args[0].charAt(i)
int a;
a = Integer.parseInt(c);
if (a==0)
sum=sum+a;
elseif (a==1)
sum = sum + Math.pow(2,i);
}

System.out.println("Decimal = "+sum);
}
}


PLS HELP ME TO POINT OUT THE ERROR