By default, Eclipse limits the amount of text in the console output window. So if you are running a program which produces a lot of output, the Console will only display the last n lines and you lose the rest.
Here is a tip which will allow you to have unlimited output in the console:
Go to Window > Preferences > Run/Debug > Console
Uncheck "Limit Console Output" (Alternatively you can increase the Console buffer size.)
We took the 1036hrs train from Waterloo and got to Hampton Court in about 30mins. We had booked our tickets on-line, so bypassed all the queues. We then spent the morning walking through the Palace, taking in the medieval architecture and spectacular tapestries. We stepped into the Tudor Kitchens to watch 16th century style cooking and then had a relaxing lunch at the Tiltyard Cafe. In the afternoon, we wandered around the beautiful Fountain and Privy Gardens and got lost in the Maze! We returned to the Tiltyard Cafe for scones and hot chocolate and then made our way back home at 1800hrs.
Today, I signed up to Scribd - the YouTube for documents. It allows you to upload and share your documents and browse other interesting documents by category. The interface has borrowed a lot of the basic design principles from YouTube. Documents can be displayed and embedded as html or the under-utilized, and faster-than-a-pdf, Flash paper format. They can be downloaded as .pdf’s, .docs, .txt, and even .mp3 files. The mp3 version is created by Scribd’s text-to-speech package that lets you listen to the text of your document in a British accent. Scribd also lets you view all the statistics generated by documents you post, such as how many votes and views your piece gets, as well as geographic location and http referrer that brought the reader there.
I've started uploading some of my interesting school and university projects which I probably don't have the need for any more.
The factorial of a number is the product of all positive integers less than or equal to it. e.g. the factorial of 5 is 5 x 4 x 3 x 2 x 1 = 120.
While conducting a Java interview, I like to ask my candidates to write an algorithm to calculate the factorial of a number. This is one of my favourite questions because it gives me an insight into their thinking process. It is also one of the questions that I was asked at Merrill Lynch, in my first interview out of university. (I got it right)
I am surprised at how the majority of people cannot answer this question, or get anywhere close to it. C'mon, you can do it using recursion or loop-iteration; its not that difficult! If you can't count backwards, do it forwards - its the same thing.
Here is a simple solution: