Independence Day Deal! Unlock 25% OFF Today – Limited-Time Offer
- Ends In
00:00:00
Coupon code:
SAVE25
X
Welcome to Pass4Success
Login
|
Sign up
-
Free
Preparation Discussions
Mail Us
support@pass4success.com
Location
PL
MENU
Home
Popular vendors
Salesforce
Microsoft
Nutanix
Cisco
Amazon
Google
CompTIA
SAP
VMware
Oracle
Fortinet
PeopleCert
Eccouncil
HP
Palo Alto Networks
Adobe
ISC2
ServiceNow
Dell EMC
CheckPoint
Discount Deals
New
About
Contact
Login
Sign up
Home
Discussions
Oracle Discussions
Exam 1Z0-809 Topic 5 Question 69 Discussion
Oracle Exam 1Z0-809 Topic 5 Question 69 Discussion
Actual exam question for Oracle's 1Z0-809 exam
Question #: 69
Topic #: 5
[All 1Z0-809 Questions]
Given:
Which option fails?
A
Foo<String, Integer> mark = new Foo<String, Integer> (''Steve'', 100);
B
Foo<String, String> pair = Foo.<String>twice (''Hello World!'');
C
Foo<Object, Object> percentage = new Foo<String, Integer>(''Steve'', 100);
D
Foo<String, String> grade = new Foo <> (''John'', ''A'');
Show Suggested Answer
Hide Answer
Suggested Answer:
D
by
Pansy
at
Aug 03, 2024, 01:34 AM
Limited Time Offer
25%
Off
Get Premium 1Z0-809 Questions as Interactive Web-Based Practice Test or PDF
Contribute your Thoughts:
Submit
Cancel
Hollis
1 months ago
Wait, what's a Foo? Is that like some kind of foo-foo Java class?
upvoted
0
times
...
Alishia
1 months ago
Option D is the correct answer. The diamond operator <> allows the compiler to infer the generic types.
upvoted
0
times
...
Rory
2 months ago
Haha, option A is a classic. You can't create a Foo object with mismatched generic types.
upvoted
0
times
Carlene
17 days ago
User 3: Option A is a clear fail, can't mix up those types.
upvoted
0
times
...
Aleshia
25 days ago
User 2: I agree, you can't have different generic types for a Foo object.
upvoted
0
times
...
Katheryn
1 months ago
User 1: Yeah, option A is definitely incorrect.
upvoted
0
times
...
...
Sherman
2 months ago
Option B looks good to me. The Foo.twice() method should work with String types.
upvoted
0
times
...
Lavera
2 months ago
Option C is incorrect. You can't assign an Integer to an Object type.
upvoted
0
times
Stephaine
2 days ago
User 2: That's right. Option A is also incorrect because you can't assign an Integer to a String type.
upvoted
0
times
...
Cherelle
1 months ago
User 1: Option C is incorrect. You can't assign an Integer to an Object type.
upvoted
0
times
...
...
Lewis
2 months ago
That's a good point, I see what you mean now. Option D does seem incorrect.
upvoted
0
times
...
Blossom
2 months ago
I disagree, I believe option D fails because it's missing type arguments.
upvoted
0
times
...
Lewis
3 months ago
I think option C fails because it's trying to assign a String to an Integer.
upvoted
0
times
...
Log in to Pass4Success
×
Sign in:
Forgot my password
Log in
Report Comment
×
Is the comment made by
USERNAME
spam or abusive?
Commenting
×
In order to participate in the comments you need to be logged-in.
You can
sign-up
or
login
Save
Cancel
az-700
pass4success
az-104
200-301
200-201
cissp
350-401
350-201
350-501
350-601
350-801
350-901
az-720
az-305
pl-300
Hollis
1 months agoAlishia
1 months agoRory
2 months agoCarlene
17 days agoAleshia
25 days agoKatheryn
1 months agoSherman
2 months agoLavera
2 months agoStephaine
2 days agoCherelle
1 months agoLewis
2 months agoBlossom
2 months agoLewis
3 months ago