hello
can anyone help me with this
import javax.swing.*;
public class Q6 {
public static void main ( String args [] ) {
int nv,np,ns,nc;
int c=0 , v=0 , p=0 , s=0;
String input = JOptionPane.showInputDialog(null,"please Enter the statement") ;
for (int i=0; i<input.length ( ); i++) {
switch (input.charAt (i)) {
case 'a': case 'A': case 'i': case 'I': case 'e': case 'E': case 'u': case 'U':
case 'o': case 'O':
v++;
break;
case '.': case '?': case '{': case '}': case '[': case ']': case '-': case '_':
case ':': case '"': case ';': case ',': case '!':
p++;
break;
case' ':
s++ ;
break;
default :
c++ ; }
}
System.out.println("Number Of constant :"+ nc) ;
System.out.println("Number Of vowels :"+nv ) ;
System.out.println("Number Of punctuation charachter :"+ np) ;
System.out.println("Number Of spaces :"+ ns) ;
}
i got an error but i don't know where is it ?