try {
if (x.length == Styles.size()) {
}
else{
throws InputMismatchException ;
}
} finally {
OutputFileScanner.close();
}
I get compile error in method contains code above , is there any way to throw InputMismatchException in else block ?