- Back to Home »
- tutorials , tutorials-java »
- How to JAVA using JCREATOR (newb) : 2
Posted by : Unknown
Saturday, April 25, 2015
Creating a variable
variables are like a container, you can put somethin' in to it.
there are many types of variable like: String, Integer, and etc.
in java you can create a variable by,
[Variable_Type] [Variable_Name] = [Variable_Value];
examples:
String hello = "Hello World!!!";

int x = 1;
note: String's value must be enclosed with double quotation, while numbers or integers don't.
Now lets create a new program, if you don't know how to create one click here.
Now type this and run it.
The output must be:
Hello World!!!
3
HAVE FUN EXPLORING THE WORLD OF JAVA!!!