Which of the following statement(s) are true given the code snippet sophie conta
ID: 3877782 • Letter: W
Question
Which of the following statement(s) are true given the code snippet
sophie contains a pointer to an integer value, sally contains a pointer to a String value.
sophie is a variable, but sally contains an object.
sophie contains an integer value like 5, but sally points to an object of type String.
-Both sophie and sally are variables.
Which of the following statement(s) are true given the code snippet
int sophie;
String sally; Note: Multiple Answer....-
sophie contains a pointer to an integer value, sally contains a pointer to a String value.
-sophie is a variable, but sally contains an object.
-sophie contains an integer value like 5, but sally points to an object of type String.
-Both sophie and sally are variables.
Explanation / Answer
1.false
int sophie is not a pointer,it is a varible
also sally will contain a string literal.
2.true
sophie is varibale
sally contains an object whcih is sting literal
3.true
ssophie can contain 5 as it integer variable
sally it an object of type string
4.true
sophie is a variable
sally string varible.
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.