Home Tutorial Flex Flex4 Flex Variables

 
 

Flex Variables
Posted on: April 19, 2010 at 12:00 AM
Advertisement
A variable is a reference to the value associated with it. Variables are used to store values for the application.
A variable is a reference to the value associated with it. Variables are used to store values for the application.

In flex, var statement is used to declare the variable.
var myVar:int;

Variable is assigned a value using assignment operator (=).
myVar = 10;

Declaration and assignment of the variable can be done simultaneously.
var myVar:int = 10;

The type of the variable can be any predefined type provided by flex or custom data type.
var myVar:MyClass = new MyClass();
Advertisement

Related Tags for Flex Variables:


Follow us on Twitter, or add us on Facebook or Google Plus to keep you updated with the recent trends of Java and other open source platforms.

Posted on: April 19, 2010

Recommend the tutorial

Advertisements Advertisements
 

 

 

DMCA.com