C,c#,javascript,java

Source: Internet
Author: User
Tags array definition

 
C C# Javascript Java
Case sensitive Is Is Is Is
Statement end Semicolon Semicolon Semicolon, optional Semicolon
Line Comment // // // //
Block annotations /**/ /**/ /**/ /**/
Description Comment /// /** Start, * * End
Identifier Letters, numbers, underscores, must start with a letter or underscore Letters, numbers, underscores, must start with a letter or underscore Must start with a letter,& and _ can also, but not recommended Letters, numbers, underscores, dollar characters, must start with a letter, underscore, or dollar symbol
Constant

#define CONST PI=3.14

Habitually, the constant name is all uppercase.

Const FLOAT PI=3.14

MSDN recommends using Pascal to name

No constants

Final Double pi=3.14

Habitually, the constant name is all uppercase.

Data type

Base type: integer, float, character, enum

Constructed type: array, struct, community

Pointer type

Empty type

Built-in 15 predefined types

13 Types of values

2 reference types, object,string

Dynamic types, the same variables can be used for different types.

Number, String, Boolean, Array, object, null,undefined

Built-in types and reference types.

Available in 8 basic types, 6 numeric types, 1 character types, and 1 Boolean types.

String String has end tag

can be enclosed in single or double quotation marks.

Quotation marks use: does not match the characters used to include. For example, enclose a single quotation mark, and the interior can contain double quotes.

Operator

Comparison operators

==,!=,<,>,<=,>=

comparison Operators

==,!=,<,>,<=,>=

comparison Operators

==,!=,<,>,<=,>=

comparison Operators

==,!=,<,>,<=,>=

logical operators

!,&&,| |

logical Operators

!,&&,| |

logical Operators

!,&&,| |

logical Operators

!,&&,| |

pointer Operators

*,&

nullable operator

?

congruent operators, values and types are congruent

===

No string join operator

String Join operators

+

String Join operators

+

String Join operators

+

Flow control If...else If...else ... If...else If...else ... If...else If...else ... If...else If...else ...
For ... For ... For ... For ...
While ... While ... While ... While ...
Foreach... for (x in obj) for (an int x in array)
Array definition int a[10]={1,2,3,4,5}; Int[] A=new int[10]; var a=new Array (10); Int[] A=new int[10];

int a[2][3]={{1,2,3},{4,5,6}}

int[,] a=new int [2,3];

Int[][] A=new int[2][3];

C,c#,javascript,java

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.