fork download
  1. /* package whatever; // don't place package name! */
  2.  
  3. import java.util.*;
  4. import java.lang.*;
  5. import java.io.*;
  6. import java.awt.event.*;
  7.  
  8. /* Name of the class has to be "Main" only if the class is public. */
  9. class Ideone
  10. {
  11. public static void main (String[] args) throws java.lang.Exception
  12. {
  13. int i = 10;
  14. public void actionPerformed(ActionEvent e) {
  15. // i++;
  16. System.out.println("DURANTE i=" +i);
  17. }
  18. };
  19. System.out.println("ANTES i=" +i);
  20. a.actionPerformed(null);
  21. System.out.println("DEPOIS i=" +i);
  22. }
  23. }
Success #stdin #stdout 0.09s 27728KB
stdin
Standard input is empty
stdout
ANTES i=10
DURANTE i=10
DEPOIS i=10