Question: Java programming multiple choice and one fill in the blank 1. What is the value of d if the user enters 123 ? Scanner kybd
Java programming multiple choice and one fill in the blank
1. What is the value of d if the user enters 123?
Scanner kybd = new Scanner(System.in);
double d = Double.parseDouble(kybd.next());
a. 123.0
b.0.123
c. the code does not compile because 123 is an int
| 2. Declare the variable i correctly String s0 = "ab"; String s1 = "cd"; _____i = s0.compareTo(s1); | |||||
|
| 5. Which of the following statement(s) are true given the code snippet int sophie; String sally; (multiple answers) a. sophie contins an integer value like 5, but sally points to an object of type string b. sophie contains a pointer to an integer value, sally contains a pointer to a string c. sophie is a variable, but sally contains an object d. both sally and sophie are variables
|
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
