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
Kaylis [27]
4 years ago
6

The 'parseInt' method of the 'Integer' class throws a 'NumberFormatException' when it is passed a String argument that it cannot

convert to an int. Given the String variable s (which has already been assigned a value), write the code needed to convert the value in s as ________.
Computers and Technology
1 answer:
Ugo [173]4 years ago
7 0

Answer:

new BigInteger(s);

See the explanation

Explanation:

Since "parseInt" throws a 'NumberFormatException"; the best solution will be to use 'BigInteger'. Since 's' is already assigned a value, we can print it out as:

System.out.println(new BigInteger(s));

The BigInteger class might need to be imported to the class using:

import java.math.BigInteger;

You might be interested in
The advantage of a digital camera in taking nighttime photographs is that you can see
stepan [7]

Answer:

Ima say true

Explanation:

7 0
3 years ago
How does polling-based network receive work? How is it different than interrupt based network? Describe both functions and list
Alenkasestr [34]

In a polling-based network receives, the operating system keeps checking the status register after a fixed time interval to see whether a device needs hardware attention or not. CPU gradually checks the status of receive bit after a defined time interval of a clock and if the value of receive bit is true then data is moved from the RX register to the memory. In interrupt-based networks, whenever a device needs hardware processing then an interrupt is raised to inform the CPU for device attention. The data of the device is transferred to memory from the network card.

Polling is a protocol, not a hardware mechanism where the device gets attention by CPU. An interrupt is a hardware mechanism, not a protocol where the device gets attention by the interrupt handler. In polling, during receiving, parts of received data need to transfer to memory but in case of interrupts, whole data is transferred at once after receiving is done. An interrupt is a heavy operation as compared to pooling because hardware involves in it. For large amounts of data, Polling becomes an inefficient method. In polling, CPU gradually checks devices at regular intervals whereas the Interrupt handler can send interrupt at any time. Each device has its own Command ready bit which indicates whether the device requires servicing or not. In polling, CPU wastes numerous clock cycles by repetitively checking the command-ready little bit of each device. In Interrupt based network, the interrupt request line indicates whether the device requires servicing or not. In interrupt-based network, CPU cycles not wasted but CPU is disturbed only when device send interrupt signals.  

Relative performance between programmed I/O and DMA:

For determining the relative performance between programmed I/O and DMA, important factors are:

1. Size of data  

2. Frequency of operations

5 0
4 years ago
When entering new data into your table, which key should you press to move from one field or cell to the next?
prohojiy [21]

Answer:

Tab key or Enter key is the correct answer.

Explanation:

When the user want to move from one cell to another cell or field then they use the tab key or enter key. If the user wants to fill data vertically then, they use Enter key to move one cell to another and id they wants to fill data horizontally then, they use Tab key to move on the next cell. So, that's why when they want to fill data in Row or Column then, they use tab key or enter key.

6 0
4 years ago
A database at a college is required to support the following requirements. Complete the information-level design for this set of
Maslowich

Answer:

Explanation:

check the attached files below for answers to your question, thanks.

6 0
3 years ago
If my_string = "This is MY string!", why does print (my_string[0:7:5]) return "Ti" and not
notka56 [123]

In Python, a string is an array of characters, we can access these characters using index operator []. For example, we have a_string = "Hello World" a_string[0] prints the first character in string ('H').

We can also use index operator to make substrings, for example a_string[0:3] will make a substring with first, second, third and fourth character equal to "Hell".

Now to business

my_string = "This is MY string!"

print(my_string[0:7]) # Prints "This is "

print(my_string[0:7:5]) # Prints "T" then prints the sixth character since we start counting at 0 hence prints "Ti" (note that space is also a character).

Hope this helps.

7 0
4 years ago
Other questions:
  • PLS HELP!!
    13·1 answer
  • If you need to use arrows in a chart, which feature or menu option of a word processing program would you use?
    13·2 answers
  • A(n)___ is divided into rows and columns.<br> What goes in the blank?
    7·1 answer
  • ________ is the presentation of information to the user and the acceptance of the user’s commands. a.data storageb.data access l
    7·1 answer
  • Let's say that you want to create a new Integer array with a size of 56. Pick the array that would accomplish this:
    14·1 answer
  • 1. Create an interface called Runner. The interface has an abstract method called run() that display a message describing the me
    8·1 answer
  • What is 4x+2x(-3-3) thanku
    11·2 answers
  • Why does a bus topology require a terminator? a) because otherwise it would be a ring network b) because otherwise the packets w
    10·2 answers
  • What is analog computer? where is it used​
    6·2 answers
  • It is most commonly used for self-running presentations.
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!