answersLogoWhite

0

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

User Avatar

Wiki User

13y ago

What else can I help you with?

Related Questions

Why we write java program using classes?

Classes are well organised functions in java which help discriminate between two different functions.


How you make shared and synchronized variable in java thread?

A Variable that is shared as well as synchronized cannot be created in Java. These two terms are mutually exclusive and a variable that is synchronized in java cannot be shared and vice versa


How do you write java program to times a number?

Java, like many other programming languages, uses the asterisk for the multiplication operator. Therefore, two numbers a and b are multiplied, and their product assigned to a variable r, with this construct: r = a * b;


Can you interchange the term public and static in java?

The two are different, and independent from one another. A variable can be public, static, both public and static, or neither.


Difference between equals equals and equal in java?

"==" in java is the binary operator which compares two values and gives a boolean result While "=" in java is a assignment operator which assigns a value to a variable.


What is the difference between Java bean and bean?

JAVA beans and coffee beans are two very different things . JAVA beans are used to generate getters and setters. while coffee beans are use to make coffee.


What are two main purposes of the Java compiler javac?

One of them is creating *.class from *.javaSecond is identifying syntax errors in the *.java files and intimating the programmer so that he can correct them


Write a menu driven program in java to find area of different shapes. 1. Circle 2. Triangle 3. Rectangle?

Remember that the area of a rectangle is width * height: static int getArea(Rectangle r) { return r.width * r.height; }


What is classpath and path in java?

if you are using the IDE then there is no need to set class path, ant you are using Command prompt to run the java program then you need to set the class path where the class (which is going to be used in your program) is actually located,use the following command:set calsspath=%classpath%;actual_path_of the class;we cancall more than two class by using this command by using separator (,)


When class definition not found error will occur?

This error occurs when you try to run a java program and the JVM (java virtual machine ) do not found the class file for your program. there are two reasons for this kind of error to occur 1. If you haven't set the CLASSPATH environment variable for the bin directory of your java installation or to the current directory in which you are working, then JVM will never know where to look for the class files you are trying to load and so the error occurs. 2. you may be trying to run your program with a wrong class name which doesn't exist. note: this error doesn't mean that there is any error in your code.


What is different between equals equals and equals method in java?

== (the double equal sign) is used to compare two values (resulting in true if they are equal, false otherwise). = (a single equal sign) is used to assign a value to a variable.


What is the program for compare two strings using conditional operator in java?

System.out.println(a.equals(b) ? "They are equal" : "They are different");System.out.println(a.equals(b) ? "They are equal" : "They are different");System.out.println(a.equals(b) ? "They are equal" : "They are different");System.out.println(a.equals(b) ? "They are equal" : "They are different");


Why boolean variable size in java is jvm dependent?

A boolean variable is one that has only two values; true and false. The storage required depends on the underlying implementation, and could be as small as one bit, or as large as a full word in the underlying hardware. You should not be concerned with the size of a boolean variable, because the size is immaterial to the program, and because any such consideration would represent non-portable programming practices.


Is python better than java?

they are two completely different languages, and are ment for two different purposes. python can do things that java can't, and java can do things that python can't. the python languages is a scripting language, and is also built for being easy to use. its a great language to learn if it is your first time learning a language. java is built for the web. sometimes you see java-applets in web sites. java powers these. java's syntax is simular to c++. each language has pros and cons, and mattering on what you are trying to achieve, different languages can help.


In what sense is java program similar to SharpDevelop program?

These two things are nothing alike. Java is a programming language. SharpDevelop is an integrated development environment (IDE) for the .NET platform, which is basically a nice graphical interface in which people can write programs in the .NET languages.


What statement do you use to make a group of classes available to a program?

You would use the import command. For example:import java.lang;To do this with custom classes, it requires two things:These classes are grouped inside a package, so the java program can use themThese packages are included inside the program, just like the java jdk


How can you prove the given string by user is array or not in java?

Strings and Arrays are two totally different data types in Java and they will not match with one another.


What is different between Android and java?

Android is an Operating System that runs on specific devices and controls those devices' functions. Java is a general programming language that can run on many different devices (computers, phones, tablets, and so on), one of which is Android. Thus, the comparison of the two are that they are completely different, with the only relation between the two is that Android runs Java programs.


What are the different types of inductors?

there are two types of inductor fixed and variable


Is an independent variable an independent event?

No. They are two quite different things.