answersLogoWhite

0

You can declare them one by one. However, if you want to store lots of related data, you may want to consider using an array, where you use a single variable name (for example) for 1000 different items, and a number called an index to access the individual items.

User Avatar

Wiki User

13y ago

What else can I help you with?

Related Questions

Can a java program has two different variable?

Yes. You can have as many variables as you want in Java


How many structure variables of a given type can you use in a C program?

You can use unlimited number of variables for a structure and you can also declare array of structures.


How many categories of variables are there in C?

there r 3 types of variable in 'C' Integer Float Character


How many process varabile are there?

In Java programming, there are an infinite number of variables, because you declare them yourself. There are, however, different types of ways to declare variables such as; - private xxxx = yyyy; - public xxxx = yyyy; - private int static[] xxxx = { yyyy, zzzz }; etc.. (NOTE TO OTHER USERS. PLEASE DO NOT FLAG THIS AS GIBBERISH BECAUSE THERE ARE EXAMPLES OF JAVA PROGRAMMING IN THE ANSWER)


What are two kinds of variables?

There are two types of variables in Java:• Primitives - A primitive variable can be one of eight types: char, boolean, byte, short, int, long, double, or float. Once a primitive has been declared, its primitive type can never change, although in most cases its value can change.• Reference variables - A reference variable is used to refer to (or access) an object. A reference variable is declared to be of a specific type and that type can never be changed.


How is java reliable?

Java is robust because it is highly supported language, meaning that unlike C you cannot crash your computer with a bad program. Also, another factor in its robustness is its portability across many Operating systems, with is supported by the Java Virtual Machine.


How many types are there in java?

The two basic data types in Java are primitives and objects. Primitives: byte, char, short, int, long, float, double, boolean Objects: Everything else.


How many values can a method return in Java?

A method in java can declare only one return value and type at a time. For ex: a single method cannot have a code that returns a string in some cases and an integer in other cases. Java compiler does not let you do that. You can only have one return type for every method in java.


What is java 7?

Java 7 is the most current version of Java. Many movies and games use Java.


What is the difference between class variables and instance variables?

In the case of an instance variable, there is one copy for every instance (object). If you create 10 objects based on a class, there will be 10 copies of the variable. A class variable exists only once for the entire class - no matter how many objects you create - or even if you create no objects based on the class. In Java, such variables (class variables) are declared with the statickeyword.


How many square miles is Java?

Java squared


How many pages does Declare have?

Declare has 517 pages.