Syntax error on(s), misplaced construct(s)

Hello i have this error: Syntax error on(s), misplaced construct(s) when I want to start this code:

import static javax.swing.JOptionPane.*;
String snto = "55";
snto = showInputDialog("enter the number of faces");

I have no idea where it comes from,

thanks in advance!
(and sorry for my bad english i’m French).