Created
August 7, 2016 05:54
-
-
Save ea2305/b4d769570cbbf92c46f76c79ba2266ed to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Test{ | |
static String variable_alcance_global = "Esto funciona !"; | |
public static void main(String []args){ | |
System.out.println( variable_alcance_global ); | |
funcionPrueba(); | |
//System.out.println( alcance_local ); //Esto provocaria un error de | |
//Compilación porque la variable | |
//alcance_local no existe. | |
} | |
public static void funcionPrueba(){ | |
String alcance_local = " Funciona dentro de la variable " | |
System.out.println( alcance_local + " de nuevo"); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment