answersLogoWhite

0


Best Answer

True and false in the same time, because even so you can declare array size using notation for variables you have use constwhich makes your variable basically a constant:

const int
arraySize = 10;

In Java, you can use any expression to define the array size, when you create the array. Once you create an Array object, however, you can't redimension it - but you can create a new Array object and destroy the old one.

User Avatar

Wiki User

14y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: You can use a variable to declare an array's size true or false?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

Is an array is a collection of characters that can be fixed or variable?

No. An array is a collection of objects of any type, such as doubles, not just characters. You can even have arrays of arrays, or arrays of structs. In C, the size of an array is fixed, but it is possible to write code that will allow you to manually make it variable in size.


What is memory leakage in terms of arrays?

leakage in arrays occur when you declare an array with big size and using only very few bytes.


Arrays whose size can be altered are known as?

Arrays whose size can be altered are known as dynamic arrays.


1 write a c function that takes a parameters two integer arrays and their sizeboth arrays are of the same size and returns a 1true if the arrays have the same contents or a 0 false if not?

int comp(const int a1[], const int a2[], const int size) { int i; for(i = 0; i < size; ++i) { if(a1[i] != a2[i]) { return 0; } } return 1; }


What is the way by which you can make the user defined the size of the arrays?

By using the library function #define A[] we can define the size of arrays


Can an arrays size declarator be negative?

no


Where the variables are stored in the computer?

Variable stored in the memory block inside the RAM. whenever we declare a variable it would take space in main memory and consume it's size from RAM.


How can arrays be used for inter function communication?

The size of a function can be determined from the size of the array. Arrays and functions are both used in computer programming.


How do arrays differ from single memory position variables?

A single memory position variable can store only one value of its type. An array can store n number of values, where n is the size of the array.


What is the required syntax for creating C arrays?

The required syntax for creating C arrays include the brackets, array size, variety length arrays, codes like std:vector, classPTR, and many more to create C arrays.


What is a size independent variable?

A variable that is not affected by the size of the subject (or experimental unit).


What is the function in java to find the size of given variable?

Dependion on the variable there are several methods to do it, this can only be applied to primitive types and arrays, for an array its the "name_of_array.length", for the arraylist this change just a little, it would be like "name_of_array_list.size()", for an int, double, float, long, byte, it would be like "name_of_variable.LENGTH" this is a public variable so you dont need a get, an finally for the String there is a method "name_of_string.length()" this would return the size of this String