I.T. Discussion Community!
-Collapse +Expand
Java
Search Java Group:

Advanced
-Collapse +Expand Java To/From
To/FromCODEGuides
-Collapse +Expand Java Store
PRESTWOODSTORE
   ► KBTo/From GuidesJavaOperators  All Groups   Print This   

Java Operators

Assignment

Languages Focus

Common assignment operators for languages include =, ==, and :=. An assignment operator allows you to assign a value to a variable. The value can be a literal value like "Mike" or 42 or the value stored in another variable or returned by a function.

Java:   =

Java uses = for it's assignment operator.





Cross Reference Examples:

Access VBA:   =

Access uses = for it's assignment operator.

Syntax Example:
Dim Age As Integer
Dim FullName As String
   
FullName = "Randy Spitz"
Age = 38
ASP Classic:   =

ASP Classic uses = for it's assignment operator.

Syntax Example:
FullName = "Randy Spitz"
Age = 38
C#:   =

C# uses = for it's assignment operator.

Syntax Example:
int Age;
string FullName;
  
Age = 42;
FullName = "Randy Spitz";
C++:   =

C++ uses = for it's assignment operator.

Syntax Example:
int Age;
string FullName; //#include <string>
  
Age = 42;
FullName = "Randy Spitz";
C++/CLI:   =

C++/CLI uses = for it's assignment operator.

Syntax Example:
int Age;
string FullName;
  
Age = 42;
FullName = "Randy Spitz";
Corel Paradox:   =

ObjectPAL uses = for it's assignment operator.

Syntax Example:  
var
 FullName String
   Age SmallInt
endVar
  
FullName = "Randy Spitz"
Age = 42
Delphi:   :=

Delphi uses := for it's assignment operator.

Syntax Example:
var
  FullName: String;
  Age: Integer;
begin
  FullName := "Randy Spitz";
Age := 38;
end
Delphi Prism:   :=

Same as Delphi.

Syntax Example:
FullName: String;
Age: Integer;
  
FullName := "Randy Spitz";
Age := 38;
JavaScript:   =

JavaScript uses = for it's assignment operator.

Syntax Example:
//Regular assignment.
LastName = 'Spitz';
  
//Variable declaration with assignment.
var FullName = 'Randy Spitz';
var Age = 38;
Perl:   =

Perl assignment operators:

= Assignment $x = 8;
+= Addition $x += 8;
-= Substraction $x -= 8;
*= Muliplication $x *= 8;
/= Division $x /= 8;
%= Modulus $x %= 8;
**= Exponent $x **= 8;

Syntax Example:
$FullName = "Randy Spitz";
$Age = 38;
PHP:   =

PHP uses = for it's assignment operator.

Syntax Example:
$fullname = "Randy Spitz";
$age = 38;
VB Classic:   =

VB Classic uses = for it's assignment operator.

Syntax Example:
Dim Age As Integer
Dim FullName As String
   
FullName = "Randy Spitz"
Age = 38
VB.Net:   =

VB.Net uses = for it's assignment operator.

Syntax Example:  
Dim Age As Integer
Dim FullName As String
  
FullName = "Randy Spitz"
Age = 38




-
 
Have a question? Need our services? Contact us now.
--Mike Prestwood

Call: 916-726-5675

email: info@prestwood.com


616 People Online Now!!  
Sign In to see who's online now!  Not a member? Join now. It's free!
Show more stats...
Follow PrestwoodBoards on: 


©1995-2015 PrestwoodBoards  [Security & Privacy]
Professional IT Services: Coding | Websites | Computer Tech