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
AlekseyPX
3 years ago
8

Which method call converts the value in variable stringVariable to an integer?

Computers and Technology
1 answer:
zlopas [31]3 years ago
3 0

Answer:

The correct answer for the given question is Integer.parseInt( string variable );

Explanation:

Integer.parseInt( string variable ); is the method in a java programming language that convert the string into the integer value. It takes a string variable and converted into the integer.

Following are the program in java which convert the string value into an integer value.

class Main  

{

 public static void main(String []args) // main function

{

   String str1 = "10009";

// variable declaration

   int k = Integer.parseInt(str1);

// convert the string into integer.

   System.out.println("Converted into Int:" + k);

}

}

Output:

Converted into Int:10009

Convert.toInt( stringVariable );

Convert.parseInt( stringVariable,Integer.toInt( stringVariable ); are not any method to convert the string into integer .

Therefore the correct answer is :Integer.parseInt( stringVariable );

You might be interested in
What does the following code print?double[] myList = {1, 5, 5, 5, 5, 1};double max = myList[0];int indexOfMax = 0;for (int i = 1
Liula [17]

Answer:

This code will print: 4

Explanation:

Following is the step-by-step explanation for the given code:

  • Given is the array of data type double named myList, it has entries, 1, 5, 5, 5,5, 1:

                    double[] myList = {1, 5, 5, 5, 5, 1};

  • Now the first element of the array (1) with index 0 will be stored in the variable max (data type double).

                 double max = myList[0];  

  • A variable indexOfMax having datatype int will be initiated as 0.

                 int indexOfMax = 0;

  • Now for loop will be used to find the maximum number of the array. The variable i will be put as index for each element to compare with first element. If the checked element is greater than or equal to the integer in max, it will be replaced. So at the end the variable max will have value 5 that will be at index i = 4.

                    for (int i = 1; i < myList.length; i++)

                            { if (myList[i] >= max)

                               { max = myList[i];

  • Now the variable i that is the index for max value will be stored in the variable indexOfMax (indexOfMax = 4).

                  indexOfMax = i; }}

  • At end the value stored in variable indexOfMax will be printed, so 4 will be printed as output.

              System.out.println(indexOfMax);

i hope it will help you!

7 0
2 years ago
Unused neural connections in the brain are reduced through a process of
OLEGan [10]

Answer:

Pruning or remodeling

Explanation:

The brain is the major control system of animals. It acts just like the processor in a computer system. Brain development starts before childbirth and progresses to adulthood.

During the first few year of life, the neural and synapse connection multiply by millions, when the brain is mature enough, the brain begins to cut off connections of synapses, neurons and axons that are not used through the process called pruning or remodeling, which is very vital for brain development.

6 0
3 years ago
Question
LuckyWell [14K]

Answer:

you go to the what ever you use for the stuff i thing you want

Explanation:

6 0
2 years ago
What do search engines use to trust that a local business is an appropriate place for which users are looking?​
gizmo_the_mogwai [7]

Answer:

To build trust among search engines, authority needs to be demonstrated not just in a website's content, but how the site is perceived by other authoritative sites. ... Garnering links from authoritative sites like social networks, directories and other sources will improve trust.

6 0
3 years ago
When you reboot your system, the computer follows start-up instructions stored in this type of memory. multiple choice dram sdra
MA_775_DIABLO [31]
<span>A computer’s start-up instructions are stored in a type of memory called Flash. Flash memory can be written to and read from, but its contents are not erased after the computer powers down. This Flash memory is more commonly referred to as the BIOS (Basic Input Output System).</span>
4 0
3 years ago
Read 2 more answers
Other questions:
  • Why might a government entity choose to offer some information and services online as in e-government
    8·2 answers
  • You are building a gaming computer and you want to install a dedicated graphics card that has a fast gpu and 1gb of memory onboa
    15·2 answers
  • Define the role of websites in internet.also write the importance of internet in our daily life.
    6·1 answer
  • PLZZZZ I NEED THE ANSWER NOW PLZZZZ!!!!!!!!!!!!!!!!!!!!!!!!! Which one of the following is considered a peripheral? A Software B
    5·1 answer
  • How can a student manage time and stress for better results in school? Check all that apply. by taking breaks while studying by
    8·2 answers
  • Monitors display images by using a grid made up of millions of tiny dots, called ________.
    13·1 answer
  • Which line in the following program will cause a compiler error?
    9·1 answer
  • You just bought a new hard drive for your computer to be used as a secondary hard drive to store all your files. After installin
    14·2 answers
  • how can i stop this stupid thing from sending me emails because my school decides to not give you a block option
    15·2 answers
  • Please help me on this I don't know which one they are​
    6·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!