The new operator returns the address of the first reserved location or returns ____ if sufficient memory is not available.

A. zero
B. one
C. an error message
D. NULL


Answer: D

Computer Science & Information Technology

You might also like to view...

FIPS 186 -3 incorporates digital signature algorithms based on RSA and on __________ cryptography.

Fill in the blank(s) with the appropriate word(s).

Computer Science & Information Technology

John, a civil engineer, pays the heavy equipment provider an agreed-upon hourly rate and unit price for the various materials to be used. In the context of contract categories, this scenario is an example of a:

a. cost-plus-fee contract. b. cost-plus-percentage contract. c. fixed-price contract. d. time and material contract.

Computer Science & Information Technology

Why is inheritance a form of software reuse?

What will be an ideal response?

Computer Science & Information Technology

A company that transmits data over the telephone is con- cerned that its phones could be tapped. All its data is transmitted as four-digit int values. The company has asked you to write an application that encrypts its data so that the data may be transmitted more securely. Encryption is the process of transforming data for security reasons. Your application should read a four-digit integer input by the user in a JTextField and encrypt the information as described in the steps of this exercise when the user clicks the Encrypt JButton (Fig. 6.35).


```
a) Copying the template to your working directory. Copy the C:Examples Tutorial06ExercisesEncryption directory to your C:SimplyJava directory.
b) Opening the template file. Open the Encryption.java file in your text editor.
c) Coding the Encrypt JButton’s ActionPerformed event handler. Add the code for Steps d through f to event handler encryptJButtonActionPerformed (lines 138–141).
d) Obtaining the user input. In line 140, insert a statement that obtains the user input from numberJTextField, converts it to an int and assigns the value to int variable number.
e) Extracting the digits from the user input. Use the programming techniques you used to solve Exercise 5.17 to insert statements that extract the digits from int variable number. Store the digits of number in the int variables digit1, digit2, digit3 and digit4, respectively.
f) Encrypt each digit and display the encrypted results. Replace each digit by perform- ing the calculation (the sum of that dig

Computer Science & Information Technology