Answer is E.
To test:
public class Test {
int a1;
public static void doProduct(int a) {
a = a * a;
}
public static void doString(String s) {
s.concat(" " + s);
}
public static void main (String [] args) {
Test item = new Test();
item.a1 = 11;
String sb = "Hello";
Integer i = 10;
doProduct(i);
doString(sb);
doProduct(item.a1);
System.out.println(i + " " + sb + " " + item.a1);
}
}
The answer is the letter E, the values were not changed because in the lines where the methods were started, they were not registered in any variable since "sb" and "i" are not objects and there is no operation with "a1 " , it's just an instance variable of the Test class and is not used by any methods.
upvoted 1 times
...
This section is not available anymore. Please use the main Exam Page.1z0-808 Exam Questions
Log in to ExamTopics
Sign in:
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.
Upvoting a comment with a selected answer will also increase the vote count towards that answer by one.
So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.
WeeChungus
6 months, 1 week agoakbiyik
1 year agocarloswork
1 year agoiSnover
1 year, 1 month ago