Question 7 of 76 from exam 1Z0-808: Java SE 8 Programmer I

Question 7 of 76 from exam 1Z0-808: Java SE 8 Programmer I

Question

Given:

class Vehicle (
String type = "4W";
int maxSpeed = 100;

vehicle (string type, int maxSpeed) {
this.type = type:
this.maxSpeed = maxSpeed;

)

class Car extends Vehicle {
String trans;

Car (String trans) { //line ni
this.trans = trans;

i

Car (String type, int maxSpeed, String trans) {
super (type, maxSpeed) ;
this (trans) ; //line n2

And given the code fragment:

Seow

. Car cl

Car ¢2
system
system

new Car ("Auto");
new Car("4w", 150,
out. println(cl.type +
out. println(c2.type +

"Manual");

+ cl.maxSpeed +
+ c2.maxSpeed +

+ cl.trans);
+ c2.trans);

What is the result?

Answers

Explanations

Click on the arrows to vote for the correct answer

A. B. C. D. E.

C.