Answer is A.
import java.util.ArrayList;
import java.util.List;
public class Patient {
String name;
public Patient (String name) {
this.name = name;
}
}
public static void main(String[] args) {
List ps = new ArrayList();
Patient p2 = new Patient ("Mike");
ps.add(p2);
/* A */
int f = ps.indexOf(p2);
if (f >= 0) {
System.out.println("Mike Found");
}
}
upvoted 1 times
...
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.
DarGrin
3 months, 1 week agoa_really_reliable_programmer
4 months, 2 weeks agoVicky_65
9 months, 2 weeks agospongecodes
10 months, 1 week agocarloswork
1 year, 2 months ago