answersLogoWhite

0

vcbvcbcvb

User Avatar

Wiki User

∙ 14y ago
User Avatar

What else can I help you with?

Continue Learning about Engineering

What is difference between array and class?

An array is a collection of the same type of data, for example, integers. Each element is accessed through an index - a numerical value. For example, myArray[x], where "x" is an integer variable.An object (created from a class) can store different types of data; each is accessed through its name, for example, person.age, person.name, etc.An object, or class, also has several other properties that distinguish it from an array; for example, classes/objects also have methods (functions defined at the class level), and with classes you can have inheritance.


Could array may have elements that are numbers and strings?

In Java:Not as primitives; but I believe you could create an array of Objects, and then initialize the elemnets as subtypes of the Object class, i.e., any class. I don't think this would be very practical (in Java); if (for example) you need to store information about people's names with their ages, create a class called "Person" that has those two attributes, then create an array of Persons.In Java:Not as primitives; but I believe you could create an array of Objects, and then initialize the elemnets as subtypes of the Object class, i.e., any class. I don't think this would be very practical (in Java); if (for example) you need to store information about people's names with their ages, create a class called "Person" that has those two attributes, then create an array of Persons.In Java:Not as primitives; but I believe you could create an array of Objects, and then initialize the elemnets as subtypes of the Object class, i.e., any class. I don't think this would be very practical (in Java); if (for example) you need to store information about people's names with their ages, create a class called "Person" that has those two attributes, then create an array of Persons.In Java:Not as primitives; but I believe you could create an array of Objects, and then initialize the elemnets as subtypes of the Object class, i.e., any class. I don't think this would be very practical (in Java); if (for example) you need to store information about people's names with their ages, create a class called "Person" that has those two attributes, then create an array of Persons.


Why object array called universal array?

Object array is called universal array because it can store multiple variables of the same type


Attributes of a class are also known as?

Attributes of a class are also known as properties or fields. They define the characteristics or data that instances of the class will have. In object-oriented programming, these attributes can store information specific to an object created from the class.


What is string array?

A string array is an array whose contents are strings.An array is when you use a single variable names to store different data items. The data items are distinguished by a number (sometimes by more than one).A string is a data type used to store texts. It may contain letters, digits, or other symbols.A string array is an array whose contents are strings.An array is when you use a single variable names to store different data items. The data items are distinguished by a number (sometimes by more than one).A string is a data type used to store texts. It may contain letters, digits, or other symbols.A string array is an array whose contents are strings.An array is when you use a single variable names to store different data items. The data items are distinguished by a number (sometimes by more than one).A string is a data type used to store texts. It may contain letters, digits, or other symbols.A string array is an array whose contents are strings.An array is when you use a single variable names to store different data items. The data items are distinguished by a number (sometimes by more than one).A string is a data type used to store texts. It may contain letters, digits, or other symbols.

Related Questions

How can you store Class properties in Array in c?

Yes, you can create array that will store class properties. But all of them have to be of the same type.


What is difference between array and class?

An array is a collection of the same type of data, for example, integers. Each element is accessed through an index - a numerical value. For example, myArray[x], where "x" is an integer variable.An object (created from a class) can store different types of data; each is accessed through its name, for example, person.age, person.name, etc.An object, or class, also has several other properties that distinguish it from an array; for example, classes/objects also have methods (functions defined at the class level), and with classes you can have inheritance.


Could array may have elements that are numbers and strings?

In Java:Not as primitives; but I believe you could create an array of Objects, and then initialize the elemnets as subtypes of the Object class, i.e., any class. I don't think this would be very practical (in Java); if (for example) you need to store information about people's names with their ages, create a class called "Person" that has those two attributes, then create an array of Persons.In Java:Not as primitives; but I believe you could create an array of Objects, and then initialize the elemnets as subtypes of the Object class, i.e., any class. I don't think this would be very practical (in Java); if (for example) you need to store information about people's names with their ages, create a class called "Person" that has those two attributes, then create an array of Persons.In Java:Not as primitives; but I believe you could create an array of Objects, and then initialize the elemnets as subtypes of the Object class, i.e., any class. I don't think this would be very practical (in Java); if (for example) you need to store information about people's names with their ages, create a class called "Person" that has those two attributes, then create an array of Persons.In Java:Not as primitives; but I believe you could create an array of Objects, and then initialize the elemnets as subtypes of the Object class, i.e., any class. I don't think this would be very practical (in Java); if (for example) you need to store information about people's names with their ages, create a class called "Person" that has those two attributes, then create an array of Persons.


How do you store a number of integers entered by the user in an array with java?

use a loop(for or while) to get the input from the user then store each in the array using the Scanner class like this import java.util.Scanner;//before class declaration int[] Array = new int[10]; //just an example gets 10 ints from user Scanner input = new Scanner(System.in); then something like this for(int i = 0; i < 10;i++) { System.out.println("enter number:"); Array[i]= input.nextInt(); }


What is a sentence for array?

Alexia is looking for a different array at Kamaria's corner store.


Why object array called universal array?

Object array is called universal array because it can store multiple variables of the same type


What variable describes an object?

In programming, an object is described by variables known as properties, which store information about the object's state. These properties are defined as part of the object's class or prototype.


Attributes of a class are also known as?

Attributes of a class are also known as properties or fields. They define the characteristics or data that instances of the class will have. In object-oriented programming, these attributes can store information specific to an object created from the class.


A sentence with the word array?

Array your tools in the order you expect to use them. The sporting goods store has a wide array of exercise shoes.


What is the improved array definition?

An array is used to store data having the same data type.


What is string array?

A string array is an array whose contents are strings.An array is when you use a single variable names to store different data items. The data items are distinguished by a number (sometimes by more than one).A string is a data type used to store texts. It may contain letters, digits, or other symbols.A string array is an array whose contents are strings.An array is when you use a single variable names to store different data items. The data items are distinguished by a number (sometimes by more than one).A string is a data type used to store texts. It may contain letters, digits, or other symbols.A string array is an array whose contents are strings.An array is when you use a single variable names to store different data items. The data items are distinguished by a number (sometimes by more than one).A string is a data type used to store texts. It may contain letters, digits, or other symbols.A string array is an array whose contents are strings.An array is when you use a single variable names to store different data items. The data items are distinguished by a number (sometimes by more than one).A string is a data type used to store texts. It may contain letters, digits, or other symbols.


How you can store a class variables in array list?

An (non generic) arrayList in java can save any type of object (in this case your class variable) in this straightforward way: MyClass myClassVar = new MyClass(); ArrayList myArrayList = new ArrayList(); myArrayList.add(myClassVar);