eclipse scrapbook

Hi,


In my eclispe I went to File--new-->SCrapbook and gave name sample and selected a project and then pasted below code in that sample.page.

How to run this scapbook content to see the result. What is the use of scrapbook in eclpse.  How to effectively use it.

int Score=11;
Score++;
Score=Score*2;
Score=Score/3;
System.out.println("score is " + Score);

when i ran this program as java main application got output as 8.
My question is  below line not assigned back to any variable.Does not this addition lost in the air as we have not assigned back to anything like the case of STRING objects.

Score++;

Also for below float and long declaration why we have give 'f' and 'l' at the end. If we do not give what happens.
float aCost = 22.50f;
long tCards =9999283888399l;

Please advise.


Any links resources ideas highly appreciated. Thanks in adv
LVL 7
gudii9Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

CEHJCommented:
My question is  below line not assigned back to any variable.Does not this addition lost in the air as we have not assigned back to anything
Well it IS assigned, as what effectively happens is:
score = score + 1;

Open in new window

You need to study the postfix operator if you're surprised that the values of a and b in the following are the same

int score = 1;
int a = score;
int b = 0 + score++;

Open in new window

0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
mccarlIT Business Systems Analyst / Software DeveloperCommented:
How to run this scapbook content to see the result
After pasting the code into the scrapbook page, you have to then "select" the code again and then there should be a new toolbar button whose function is "Execute the selected text", click this and you should see the output come up in the console display.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Java EE

From novice to tech pro — start learning today.