Learning about Variables
Using Variables is one of the most basic and important subjects
in programming, so this lesson is very important.
Variables are destined to save data.
You can save in variable Text or number.
For example, you can have one variable that holds the Text "Hello and Goodbye",
and have another variable that holds the number 623882
You can think about variables as a cabinet's drawers.
Every drawer has a sticker on it with its unique name.
You can put in each one of the drawers one number or one text String.
During your program, you can open the drawer with the sticker "TheUserName"
and get the text string that found inside the drawer.
You can also delete the text string that found inside the drawer
and put instead of it other text string.
Right now, we are going learn about 2 variable types.
The first type called Integer.
Integer variable can store an Integer number (round number without any fraction)
between -32,768 to 32,767.
You can store in Integer variable the number 0 or the number 375 or
the number -46, but you can't store the number 4.5 (Because of the .5)
or the number 100,000 (Because It's bigger than 32767) or the
number -50,042 (Because it's smaller than -32,768)
The second type called String.
You can store in String variable any text that you want.
For example "Hello" or "abcDDefGhIjk123456 blah blah %$#@!??? Blah!"
Popular Posts
-
Now I will show you how to retrieve the data posted from a HTML file in a JSP page. Consider an html page that prompts the user to enter his...
-
Accessing the Standard CGI Variables: To build the successful web application, you often need to know a lot about the environment in which ...
-
INTRODUCTION TO 'C': C is a programming language developed at AT & T's Bell laboratories of USA in 1972.it was designed by d...
-
SQL aliases can be used with database tables and with database table columns, depending on task you are performing. SQL column aliases are u...
-
Learning about Events (Continue) Lets program the Form_Load event. "MsgBox" is Visual Basic command that launch a message box. for...
-
Steps to follow: 1. Write Person.java as shown below in Code-11.3.a under polypackage directory. (You are welcome to do this work using eit...
-
The Command Button's KeyPress, KeyDown and KeyUp Events The events that will be mentioned in the following pages are commonly used, and ...
-
The SQL AVG aggregate function selects the average value for certain table column. Have a look at the SQL AVG syntax: SELECT AVG(Column1) FR...
-
package interfaceexercise; // Define an interface with three abstract methods. // Any class that implements this interface has to // impleme...
-
We will use the Customers table to illustrate the SQL LIKE clause usage: FirstName LastName Email DOB Phone John Smith John.Smith@yaho...
No comments:
Post a Comment