Q&A Discussions
public class Vehicle {
int maxSpeed;
int wheels;
String color;
double fuelCapacity;
void horn() {
System.out.println("Beep!");
}
}
class MyClass {
public static void main(String[ ] args) {
Vehicle v1 = new Vehicle();
Vehicle v2 = new Vehicle();
v1.color = "red";
v2.horn();
System.out.println(v1);
}
}
Explain its outcome. I am unable to get the last line of outcome.
-1 Vote
2 AnswersString converting
0 Votes
3 AnswersHot today
Safety Deposit Boxes
3 Votes
How to code a calculator
1 Votes
Follower
2 Votes
matplotlib library
1 Votes
Libraries
1 Votes
Program coding in Indonesian
0 Votes