What correctly shows how to create a variable called number with the value of 5?
long number = Math.round(4.67);
Given the code below, what would the output be?
int number = 12;
String numberString = Integer.toString(number,8);
System.out.println(numberString);
14
When using the DecimalFormat class in Java, which of the following symbols is used to represent a digit that will be displayed?
0
Given the code below, which one statement is true?
String text = "FACADE";
int number = Integer.valueOf(text,16);
if (number > 6) {
System.out.println("X");
} else if (number < 0) {
System.out.println("Y");
} else {
System.out.println("Z");
}X is printed
When using the DecimalFormatter class in Java, which of the following would be used to avoid including leading or trailing zeros when a number is formatted to a String?
#
Given the code below, what is output?
String text = "-1011";
int number = Integer.parseInt(text);
switch (number) {
case -1011:
System.out.println("A");
break;
case -7:
System.out.println("B");
break;
case 7:
System.out.println("C");
break;
case 1011:
System.out.println("D");
break;
}A