Dyskusje Q&A
java learning
0 głosów
1 Odpowiedź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 Głos
2 odpowiedziPopularne dzisiaj
Ai generated practices
2 Votes
Where did mess up....
1 Votes
Feedback on my portfolio
0 Votes
Solving coding challenges
0 Votes
Yo this is madness
0 Votes
How can i insert files?
1 Votes
Advertising in Sololearn
0 Votes
Hi who can hel me please
0 Votes