1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
marissa [1.9K]
3 years ago
11

What is output when the CarTest application is run? Why?

Computers and Technology
1 answer:
erik [133]3 years ago
5 0

Answer:

red

Explanation:

public class CarTest {

public static void main(String[] argvs) {

//below line will create an object of CarTest class Object

CarTest carTest = new CarTest();

//This will call runDemo method

carTest.runDemo();

}

public void runDemo() {

//Below line will create an object of Car class  with color blue and 4 wheel

Car c = new Car("blue", 4);

//Bellow Line will change the color from blue to red, see the logic writteen in chnageColor method definition

changeColor(c, "red");

//Below line will print the color as red

System.out.println(c.getColor());

}

public void changeColor(Car car, String newColor) {

//This line will set the color as passed color in the car object

car.setColor(newColor);

}

}

You might be interested in
Is the core of an operating system that controls its basic functions.
WINSTONCH [101]

Answer:

Explanation:

Tweaker

5 0
3 years ago
What is the TSA motto
yulyashka [42]

Answer:

the answer is "Learning to lead in a technical word".

Explanation:

7 0
2 years ago
(3)(6 Points) During a sale at a store, a 10% discount is applied to purchases over $10.00. Write a program that asks for the am
Galina-37 [17]
I only need point sort
7 0
2 years ago
After the closing entries have been posted:
Nimfa-mama [501]
Closing entries are entries<span> made at the end of an accounting period to zero out all temporary accounts. The balances are transferred to permanent accounts. 
After the closing entries have been posted:
A. the temporary accounts are zeroed out
Revenues and expenses are transferred to the income Summary Account and then Income Summary is closed to Retained earnings.</span>
7 0
3 years ago
Rhea is creating a digital textbook. She plans to use features that will help make the book more interesting for learners. Which
musickatia [10]
I would go with c. Audio and visuals catch peoples attention
4 0
2 years ago
Read 2 more answers
Other questions:
  • What is one advantage of a wireless network
    14·2 answers
  • Which is the last step in conducting a URL search?
    5·2 answers
  • The systems development life cycle (SDLC) is the overall process of developing, implementing, and retiring information systems t
    9·1 answer
  • Input 10 integers and display the following:
    6·1 answer
  • Create a Produceclass that hasan instance variable of type Stringfor the name, appropriate constructors, appropriate accessor an
    13·1 answer
  • Declare an ArrayList of Strings. Add eight names to the collection. Output the Strings onto the console using the enhanced for l
    9·1 answer
  • Direction: using the data at the left, answer the questions that follows.​
    11·1 answer
  • These 2 questions PLEASEEE (:
    14·1 answer
  • What is the full form of RPM in computer ​
    10·2 answers
  • What is the official name of an application on a desktop or a laptop?.
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!