Oracle Java SE 8 Programmer II 1z0-809 Question # 27 Topic 3 Discussion

Oracle Java SE 8 Programmer II 1z0-809 Question # 27 Topic 3 Discussion

1z0-809 Exam Topic 3 Question 27 Discussion:
Question #: 27
Topic #: 3

Given:

interface Rideable {Car getCar (String name); }

class Car {

private String name;

public Car (String name) {

this.name = name;

}

}

Which code fragment creates an instance of Car?


A.

Car auto = Car (“MyCar”): : new;


B.

Car auto = Car : : new;Car vehicle = auto : : getCar(“MyCar”);


C.

Rideable rider = Car : : new;Car vehicle = rider.getCar(“MyCar”);


D.

Car vehicle = Rideable : : new : : getCar(“MyCar”);


Get Premium 1z0-809 Questions

Contribute your Thoughts:


Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.