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
Maksim231197 [3]
3 years ago
9

* Declare a variablecalled "car" of type "Car", and initialise its value to a new instance of the "Car"class.

Computers and Technology
1 answer:
kicyunya [14]3 years ago
3 0

Answer:

Car car = new Car();

Explanation:

Here we declare a variable called car which is a reference to an object of type Car.

Next we create a new object of type Car by using the new keyword. Here we are invoking no argument constructor of class Car. In case the car class has other constructors which take additional arguments, we could have initialized our object using the corresponding version of new.

The reference variable car is initialized then to the newly created object of type Car as described in the previous step. Now we can use the car reference variable to invoke relevant methods defined in the Car class.

You might be interested in
25 POINTS!! NEED HELP ASAP!! Which of the following can be a problem for people with certain kinds of epilepsy?
olga_2 [115]
There is your answer:
Flashing images
5 0
2 years ago
What modifier should you use on the members of a class so that they are not accessible to another class in a different package,
vova2212 [387]

The private modifier specifies that only other members of the same class can access the member. The protected modifier restricts access to the member to within its own package.

<h3>What are public and private modifiers?</h3>

The public access modifier permits code from both inside and outside the class to access the class's methods and properties, whereas the private modifier prevents outside code from accessing the class's methods and properties.

Thus, private modifier is the member.

For more details about private modifier, click here

brainly.com/question/15108837

#SPJ1

5 0
2 years ago
Most people prefer to pay health insurance premiums rather than pay out of pocket for medical expenses because
oksano4ka [1.4K]
They may not have enough money for the bill at the time, and its easier to pay for insurance for unseen medical procedures.
7 0
3 years ago
Read 2 more answers
Qué propiedades del bromato de potasio han hecho que sea el aditivo más usado en la fabricación del pan​
torisob [31]

Answer:

es la capacidad de unir proteínas presentes en la harina

4 0
3 years ago
(1) Prompt the user for a string that contains two strings separated by a comma. (1 pt) Examples of strings that can be accepted
denis-greek [22]

Answer:

Check the explanation

Explanation:

#include <stdio.h>

#include <string.h>

#include <stdlib.h>

#define MAX_LIMIT 50

int checkComma(char *input)

{

int flag = 0;

for(int i = 0; i < strlen(input); i++)

{

if(input[i] == ',')

{

flag = 1;

break;

}

}

return flag;

}

int main(void)

{

char input[MAX_LIMIT];

char *words[2];

char delim[] = ", ";

printf("\n");

do

{

printf("Enter input string: ");

fgets(input, MAX_LIMIT, stdin);

size_t ln = strlen(input) - 1;

if (*input && input[ln] == '\n')

input[ln] = '\0';

if(strcmp(input, "q") == 0)

{

printf("Thank you...Exiting\n\n");

exit(1);

}

else

{

if(checkComma(input) == 0)

{

printf("No comma in string.\n\n");

}

else

{

char *ptr = strtok(input, delim);

int count = 0;

while(ptr != NULL)

{

words[count++] = ptr;

ptr = strtok(NULL, delim);

}

printf("First word: %s\n", words[0]);

printf("Second word: %s\n\n", words[1]);

}

}

}while(strcmp(input, "q") != 0);

return 0;

}

Kindly check the attached image below for the output.

4 0
3 years ago
Other questions:
  • 11. Describe an algorithm that interchanges the values of the variables x and y, using only assignments. What is the minimum num
    10·1 answer
  • given the numerical value 1010101.11, which of the following number systems is most likely represented.
    11·1 answer
  • Jim wants to develop an app for a specific purpose that would run even when his computer is not connected to the Internet. What
    11·1 answer
  • Due to the internal style sheets of some browsers, your website may look different to someone who is using firefox as opposed to
    11·1 answer
  • Employers will check you out on social media sites like Facebook, MySpace, and Twitter.
    6·2 answers
  • To maintain her audience's confidence in her, what should kiara not do while delivering her presentation?
    10·1 answer
  • Here is a list of storage devices:
    5·1 answer
  • You are reviewing the output of the show interfaces command for the Gi0/1 interface on a switch. You notice a significant number
    12·1 answer
  • 17. Which of the following keyboard shortcut is used to copy the selected text?
    13·2 answers
  • Paisa pay is facilitated in which e commerce website​
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!