Monday, June 9, 2008

Casting

One of the ways to manipulate a data type is to change the variable from one type to another. The form of conversion is known as casting. The actual syntax for casting between values is fairly simple. Put the data type you want to cast in front of the variable. as shown below.

int A;
char B;
A = (int)B;

The idea behind casting is very simple. However, there is a tricky part; you need to make sure that you understand all of the ins and outs of casting, because, if you are not careful, you could lose data during the cast. This is possible if the data type you are casting to is smaller than the orginal type.

Izea

Bloggers can now join a great program known as Payperpost to make some extra revenue just by blogging. It is a place that provides bloggers with the platform to earn some revenue at the comfort of their time/home. There are many offers that are available for bloggers to take up and they range from five to a whopping few hundred dollars!It all depends whether one’s blog is eligible for the offer and most importantly whether one managed to get the offer at the right time.Besides getting revenue from posting on your blogs or websites, there are also other sources of revenues such as paid to review, which allows bloggers to earn even more revenue.Payperpost portrays an energetic and pleasant image on its website that often gives people a refreshing and positive impression.

The features found on the website can be easily installed and the available opportunities are provided with clear guidelines of what the contents should be about.Basically, bloggers can feel free to write what they have in mind!If blogging is your interest and perhaps Payperpost will be a real deal for you while you are blogging. Besides getting offers from the market place where the offers are located, one can also have direct offers from the advertisers. This would mean another source of revenue for bloggers. Visit the get paid to blog website right now for more information!



Thursday, June 5, 2008

E+3 : Notes

Scientific notation provides a shortcut way of representing a wide range of wide of numbers, but you lose some accuracy when you use it, because it does not allow for an extended amount of accurac. Numbers often are severed rounded when they are expressed in scientific notation.

Integers

Data types intger is declared as int. It is used to represent the integer data.

Floating point

Data types that contain decimal point are declared as float and long. These types usually provide single precision values respectively.

Characters

Data type that are symbols such as "a", "%". "$" are stored in variable declared as char.

Thursday, May 29, 2008

E+3 Part 2

To convert from scientific notion to regular number, take the number before the E (E stands for exponent) and multiply it by 10 to raised to the power after the + or – sign. For example 3.4E+38, you would do the following arithmetic.
1.4 X 10 power 38

Note

Scientic notation provides a shortcut way of representing a range of numbers, but you lose some accuracy when you use because it does not allow for an extended amount of accuracy.

Wednesday, May 28, 2008

Java’s Fundamental Data Type

What is E+3 all about?

For the floating point and long double data type, the range is usually expressed in scientific notion. The scientific notion is actually an easier way to represent decimal data. It would actually require 34 follow by 4931 to represent one extreme of the range. This would really eat up a great chunk of memory that we have!

Monday, May 26, 2008

Non-numerical Literals 2

In C, a string literal represents an array of characters (the char primitive data type). However, as you will learn soon, Java does not follow suit. The following code provides some examples of the use of a string literal and the \t escape characters:

“This is a test”
“This is V test”

The first line above simple prints out the statement “This is a test.” The second line prints out the same thing, but places a tab where the \t is so, when printed, it will look something like “ This is a \test.”

Sunday, May 25, 2008

Non-Numerical Literals 2

\b Backspace
\f Form Feed
\n New line
\t Tab
\ Backslash
\’ Single quote
\” Double quote

You worked with string literal, the second major non-numerical literals, to print statements on the screen in the example in the last chapter. String literals are merely collections of character literals. Java stores string literals in a more complex type known as string object.