fork download
  1. import javax.swing.JOptionPane;
  2.  
  3. public class apples {
  4.  
  5. public static void main(String[] args) {
  6.  
  7.  
  8. String myName;
  9. int checker;
  10. myName = JOptionPane.showInputDialog("Please enter your name");
  11. checker = JOptionPane.showConfirmDialog(null, "Are you sure your name is: "+ myName);
  12. if (myName == ""){
  13. JOptionPane.showMessageDialog(null, "No name entered", "Error", JOptionPane.ERROR_MESSAGE);
  14. }
  15. if(checker == JOptionPane.NO_OPTION){
  16. JOptionPane.showMessageDialog(null, "please start again and enter your proper name","work bitch",JOptionPane.INFORMATION_MESSAGE);
  17. }else{
  18. JOptionPane.showMessageDialog(null, "Your name is: " + myName);
  19. }
  20. }
  21. }
  22.  
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.c:1: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘javax’
prog.c:3: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘class’
stdout
Standard output is empty