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

A variable definition defines the name of a variable that will be used in a program, as well as:

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

Answer:

A) The type of data it will hold

Explanation:

In most programming languages, a variable must be decalared before it can be used. Variable declarations allows the compiller to make provision of memory space for the variable so the type of data must be defined accordingly with the name of the variable because different data types occuppy different spaces in memory for example

An integer is 32 bit integral value

A char  is 16 bit unicode value

A double is 64 bit floating point value

You might be interested in
2. Kabel yang digunakan pada jangan wireline, sebagai
Mumz [18]
It’s b ........................................
7 0
3 years ago
How to determine the critical crack size for a<br> plate
Blababa [14]
Wait what? is that really a question orr
7 0
3 years ago
These devices: monitor, earphone, speakers are examples of what? Input devices Storage devices Output devices All answer are cor
solmaris [256]
They are examples of Output devices.
4 0
3 years ago
Read 2 more answers
In Microsoft Windows, which of the following typically happens by default when a file is "double-clicked"
Elenna [48]
Depending on the type of file, it normally runs or opens.
4 0
3 years ago
Read 2 more answers
Write the method makeNames that creates and returns a String array of new names based on the method’s two parameter arrays, arra
Gwar [14]

Answer:

  1. import java.util.Arrays;
  2. public class Main {
  3.    public static void main(String[] args) {
  4.        String [] first = {"David", "Mike", "Katie", "Lucy"};
  5.        String [] middle = {"A", "B", "C", "D"};
  6.        String [] names = makeNames(first, middle);
  7.        System.out.println(Arrays.toString(names));
  8.    }
  9.    public static String [] makeNames(String [] array1, String [] array2){
  10.           if(array1.length == 0){
  11.               return array1;
  12.           }
  13.           if(array2.length == 0){
  14.               return array2;
  15.           }
  16.           String [] newNames = new String[array1.length];
  17.           for(int i=0; i < array1.length; i++){
  18.               newNames[i] = array1[i] + " " + array2[i];
  19.           }
  20.           return newNames;
  21.    }
  22. }

Explanation:

The solution code is written in Java.

Firstly, create the makeNames method by following the method signature as required by the question (Line 12). Check if any one the input string array is with size 0, return the another string array (Line 14 - 20). Else, create a string array, newNames (Line 22). Use a for loop to repeatedly concatenate the string from array1 with a single space " " and followed with the string from array2 and set it as item of the newNames array (Line 24-26). Lastly, return the newNames array (Line 28).

In the main program create two string array, first and middle, and pass the two arrays to the makeNames methods as arguments (Line 5-6). The returned array is assigned to names array (Line 7). Display the names array to terminal (Line 9) and we shall get the sample output: [David A, Mike B, Katie C, Lucy D]

5 0
3 years ago
Other questions:
  • Write a program that requires the user to enter two floating-point numbers (num1 and num2) from the keyboard. Multiply them and
    6·1 answer
  • Oday's color display devices represent color using the ______ color model.â
    13·1 answer
  • When you use the ip address of the web server, the correct site is displayed?
    15·1 answer
  • Was the type writer the first part of the keyboard? ​
    8·1 answer
  • To save a file so that it can be opened on most computers, select the ____ option.
    10·2 answers
  • Which term collectively describes hard disks, CDs, and flash drives?
    11·2 answers
  • 3. State whether the given statements are true or false. a. The computer is called a data processor because it can store, proces
    13·1 answer
  • 1. Write an if statement that assigns 20 to the variable y, and assigns 40 to the variable z
    10·1 answer
  • Does technology shape society or does society shape technology?
    14·1 answer
  • A mesh network topology allows all computers to be directly connected. True or False
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!