Answers for "scope of a variable in java"

3

java variable declaration

java decleration

float simpleInterest; //Declaring float variable
Posted by: Guest on May-08-2020
-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