Java: Error "void cannot be converted to String"
Go to solution
Solved by MotionFlex,
public static void showMessageDialog(Component parentComponent, Object message)
showMessageDialog doesn't return anything. So change:
a = JOptionPane.showMessageDialog(null, "b is "+ b);
to:
JOptionPane.showMessageDialog(null, "b is "+ b);
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now