Answers for "how to set variable in and out of scope java"

-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 "how to set variable in and out of scope java"

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language