exam questions

Exam 1z0-819 All Questions

View all questions & answers for the 1z0-819 exam

Exam 1z0-819 topic 1 question 45 discussion

Actual exam question from Oracle's 1z0-819
Question #: 45
Topic #: 1
[All 1z0-819 Questions]

Given:

and

and

What is the result?

  • A. Good Night, Harry
  • B. Good Morning, Potter
  • C. Good Morning, Harry
  • D. Good Night, Potter
Show Suggested Answer Hide Answer
Suggested Answer: D 🗳️

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
ASPushkin
5 months, 2 weeks ago
Selected Answer: D
Static methods are not polymorphic. The method that is invoked is determined by the reference type of the variable (by the type). The object type determines which implementation is executed for overridden methods. The object type corresponds to the instantiated class. ------- static method s.greeting() - the method that is invoked is determined by the reference type of the variable s.name() - the object type determines which implementation is executed for overridden methods.
upvoted 1 times
...
d7bb0b2
1 year, 1 month ago
D is correct, static method not override, only instance method because has the same signature and name is override. When uses a Super class variable and access to static method is the methods of that class
upvoted 1 times
...
[Removed]
1 year, 5 months ago
Selected Answer: D
D correct. Tested
upvoted 1 times
...
Omnisumem
1 year, 5 months ago
Selected Answer: D
Tested: D.
upvoted 1 times
...
tmuralimanohar
1 year, 7 months ago
Answer: D
upvoted 1 times
...
Stavok
1 year, 8 months ago
Selected Answer: D
D is correct
upvoted 1 times
...
Mukes877
1 year, 8 months ago
Selected Answer: D
D is correct Because instance method cannot override the static method from Super And Potter will be printed because other method will be overriden by instance method So Good night, Potter will printed.
upvoted 1 times
...
RP384
1 year, 11 months ago
Selected Answer: D
instance method cannot override the static method from Super
upvoted 1 times
...
TADIEWA
2 years, 1 month ago
D not A but the explanation is the same
upvoted 1 times
...
TADIEWA
2 years, 1 month ago
A is correct , static methods are class bound hence are not inherited
upvoted 1 times
...
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.

SaveCancel
Loading ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago