fork download
  1. /* package whatever; // don't place package name! */
  2.  
  3. import java.util.*;
  4. import java.lang.*;
  5. import java.io.*;
  6.  
  7.  
  8. /* Name of the class has to be "Main" only if the class is public. */
  9. class Ideone
  10. {
  11. String nombre;
  12.  
  13. public static void main (String[] args) throws java.lang.Exception
  14. {
  15. nombre= "Juan Jose";
  16. // your code goes here
  17. //for (i=0; i<2; i++)
  18. // System.out.println("numero es")
  19.  
  20. }
  21. }
Compilation error #stdin compilation error #stdout 0.04s 4386816KB
stdin
Standard input is empty
compilation info
Main.java:15: error: non-static variable nombre cannot be referenced from a static context
		nombre= "Juan Jose";
		^
1 error
stdout
Standard output is empty