# 1z0-809 — Question 604

**Type:** multiple_choice
**Topics:** topic_1

## Question

Given the definition of the Vehicle class:
Class Vehicle {
int distance;
Vehicle (int x) {
this distance = x;
}
public void increSpeed(int time) {
int timeTravel = time; //line n1
//line n3
class Car {
int value = 0;
public void speed () {
value = distance /timeTravel; //line n2
System.out.println ("Velocity with new speed"+value+"kmph");
}
}
speed(); //line n3
}
}
and this code fragment:
Vehicle v = new Vehicle (100);
v.increSpeed(60);
What is the result?

## Correct Answer

_See scenario._

## Explanation

Selected Answer: D
the call to the method speed() is out of the class Car, so the call must be with new Car().speed() to be correct

**Reference:** examtopics_top_comment

---
Source: https://hiexam.net/q/oracle/1z0-809/604  
Practice (tracked): https://hiexam.net/study/1z0-809/practice