how to create a variable in java in javascript

index.tsx
//To create a variable in JavaScript, we use the var keyword followed by the variable name and optionally an initial value.
//For example:
var myVariable;
var myOtherVariable = 10;
181 chars
5 lines

Java

//To create a variable in Java, we specify the type of the variable followed by the variable name and optionally an initial value.
//For example:
int myVariable;
String myOtherVariable = "hello";
196 chars
5 lines

related categories

gistlibby LogSnag