Try to output the difference between the definitions of the three languages
Java
int a=0;
/*integer*/
double a = 1.1234;
/*Decimal point*/
char a = "Character type";
boolean a = true;
/*A type that has only one of true / false*/
String a = "AIUEO";
/*Replace with String a= new String("AIUEO");*/
/*A basic data type is a type that originally exists as the very basic data of Java.
On the other hand, a class type is a type that can be used by defining the object in the class.*/
int[][] array;
int[0[]=2;
There is still, but the impression is that he is a serious person who must be defined quite exactly.
JavaScript
var a=0;
var a='Ah';
/*Ambiguous definition unlike Java without limitation*/
let a=0;
/*Use let to limit variable scope to blocks*/
const a=0
/*Java final int a=0;Synonymous with*/
/*If you don't want to change to the last*/
It's modern to say goodbye to likes and dislikes with an ambiguous feeling
C#
sbyte a=0;
//The range is-128~127, signed 8-bit integer//
short a=0;
//The range is-32768~32767, signed 16-bit integer//
int a=0;
//The range is-2147483648~2147483647, a signed 32-bit integer//
long a=0;
//The range is-9223372036854770000~9223372036854775807, signed 64-bit integer//
byte a=0;
//The range is 0~255, unsigned bit integer//
ushort a=0;
//The range is 0~65535, unsigned 16-bit integer//
uint a=0;
//The range is 0~4294967295, unsigned 32-bit integer//
ulong a=0;
//The range is 0~18446744073709551615, unsigned 64-bit integer//
float a=1.5;
//Floating point type//
//The range is ± 1.5e-45~±3.4e38(Approximate range)And the number of effective digits is 7//
double a=1.5;
//Floating point type//
//The range is ± 5.0e-324~±1.7e308(Approximate range)And the number of valid digits is 15~16 digits//
bool a = true;
//true/false(Boolean value)//
//The bool type is suitable for creating variables for true or false storage only.//
char a='X';
//The range is U+0000~U+Unicode 16-bit characters in ffff//
decimal a = 199.9m;
a = 400.75M;
//The range is ± 1.0×10-28~±7.9 x 1028 with 28 valid digits~There is a 29-digit type.//
string a = "b " + "c";
//String type//
int[,]a={{1,2,3},{4,5,6}
//Multidimensional array 1//
a[1,2]=9;
//Multidimensional array 2//
//java is[][]But,Just separate with//
I had the impression that it was also made with Java, but as I learned it, I got the impression that it was Java + javascript.
Recommended Posts