Popular Post

Posted by : Unknown Saturday, April 25, 2015

Click here for part 1


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!!!


Leave a Reply

Subscribe to Posts | Subscribe to Comments

- Copyright © YourLounge - Absolute Newbie - Powered by Blogger - Designed by Tongkayla -