The ______ of a variable is the part of the program where the variable can be
referenced and used
range
Give this one a try later!
data type
scope CORRECT
definition
, The output of the following program is public class Test {
public static void main ( String[] args ) {
String s1 = "A simple program";
boolean b = s1.startsWith("A simple program");
System.out.println( "b = " + b );
}
}
Give this one a try later!
b = true CORRECT
b = false
b = -1
b = -5
A variable defined inside a method is referred to as which of the following?
Give this one a try later!
local variable
Given this section of code :
String strA;
String strB = new String("any stuff");
How many objects have been created?
Give this one a try later!
referenced and used
range
Give this one a try later!
data type
scope CORRECT
definition
, The output of the following program is public class Test {
public static void main ( String[] args ) {
String s1 = "A simple program";
boolean b = s1.startsWith("A simple program");
System.out.println( "b = " + b );
}
}
Give this one a try later!
b = true CORRECT
b = false
b = -1
b = -5
A variable defined inside a method is referred to as which of the following?
Give this one a try later!
local variable
Given this section of code :
String strA;
String strB = new String("any stuff");
How many objects have been created?
Give this one a try later!