answersLogoWhite

0

What is a declaring variable?

Updated: 8/20/2019
User Avatar

Wiki User

11y ago

Best Answer

Variable declaration is when you declare a variable. For example: String foo;

The data type is String and now I can modify foo and don't need to type String again. It can be an instance variable or a local variable.

User Avatar

Wiki User

8y ago
This answer is:
User Avatar
More answers
User Avatar

Wiki User

11y ago

name it at first

This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: What is a declaring variable?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

What is syntax in declaring a variable?

type your answer here


Difference between declaring a variable and definition a variable?

Declaration is a promise: 'I will define (or has defined) this variable/function somewhere else'.


What is syntax in c plus plus for declaring a variable?

type variable {[optional array size]} {= optional initializer};


What is declaring pointer variable?

I'll give you an example: char *s;


When declaring a variable one thing you shouldn't do?

When declaring a variable, don't use short and cryptic names such as 'x'. Use descriptive names for the variable, such as 'accumulator'. Also, don't declare more than one variable on the same line. You can, but it will help take some errors away from your code.


Is there any memory wastage for declaring a pointer variable?

No, unless you do not use it at all.


What is forward reference?

Forward reference is a terminology of coding standards. It is in which a variable is used before declaring it.


How do you clear a variable in PHP?

You can unset a variable in PHP by setting it to NULL. You can set a variable to NULL by declaring it normally, or using the function "unset()". Both methods are acceptable, and accomplish the same thing. Examples of both: ---- $variable = NULL; ---- unset($variable); ----


How to display a variable in PHP using echo or print statements?

displaying a variable in php using echo statement? <?php $name="ram"; //declaring and defining the variable echo "$name"; //printing the variable using echo command ?>


What is main difference between declaring variable and volatile variable?

In languages like C, declaring a variable "volatile" tells the compiler that it can't assume that the variable is only changed by the program code. If the variable is not declared volatile, sometimes the compiler can make certain optimizations since it can assume that it knows everything about how the variable will be used. When it is declared volatile, the variable may be changed by an external process (for example, it could be connected to an I/O device), so it must always be fetched from memory. For a better explanation, see the related links.


What is the difference between declaring static variable as local and global?

There are two ways to declare varibles. 1. Locally 2. Globally When you declare a variable locally in any function that means it is only accessible by that function. When you declare a variable globally so it is accessible by all the functions in the program. Declaring variables with static keyword means you are setting its value null.


What is the difference between a global variable and a private variable?

The accessibility. The global one: almost everywhere in the code may reference to the global variable directly. The private variable, is private to the declaring module (class, method, assembly) only. Outside of that module has no access to it directly.