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?
asdfjhfgjuaDCV
7 months, 3 weeks agosteefaand
8 months, 3 weeks agovleunti
1 year agosandoro
1 year, 3 months agor1muka5
1 year, 8 months agoMR_JAVA
1 year, 8 months agoJonanien
2 years agoKyle_XY
2 years, 6 months agoHanenBA
2 years, 8 months agoYasinGaber
2 years, 8 months agoMinks
3 years, 1 month agoSvetleto13
3 years, 5 months agoSvetleto13
3 years, 5 months agomeyow
3 years, 6 months agomaslac
3 years, 6 months agoMilkBiscuit
3 years, 10 months agovarconite
3 years, 11 months ago