Answers for "what is java varibel scope"

-1

Variable scope in Java

public class Main {
  public static void main(String[] args) {

    // Code here CANNOT use x

    int x = 100;

    // Code here can use x
    System.out.println(x);
  }
}
Posted by: Guest on October-19-2021

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language