as a general note, when you post "this won't compile", it is a trememdous help if you post the compiler error. It really, truly does tell you what the problem is, or gives you a pretty good hint.
Never ascribe to malice that which can be adequately explained by stupidity.
Rory Lynch
Ranch Hand
Joined: Aug 03, 2007
Posts: 95
posted
0
Good point. the error is as follows
*>javac Say.java Say.java:81: integer too large: 999999999999 long upperLimit = 999999999999; ^ 1 error
NB. the hat symbol is below the fist 9, but the formatting is lost on posting
I am confused because I am attemping to declare and initialize a long and not an integer. [ August 31, 2007: Message edited by: Rory Lynch ]
Ulf Dittmer
Marshal
Joined: Mar 22, 2005
Posts: 35220
7
posted
0
If you want it to be recognized as a long, you'll need to append an "L", as in "999999999999L", otherwise the compiler assumes you want an int.
[I]Originally posted by Rory Lynch: the error is as follows
NB. the hat symbol is below the fist 9, but the formatting is lost on posting [/I]
The key when you want to maintain the formatting is to put it into code tags (note the buttons below the text area when you post)
JavaBeginnersFaq "Yesterday is history, tomorrow is a mystery, and today is a gift; that's why they call it the present." Eleanor Roosevelt
Rory Lynch
Ranch Hand
Joined: Aug 03, 2007
Posts: 95
posted
0
got it.
Katrina Owen
Sheriff
Joined: Nov 03, 2006
Posts: 1334
11
posted
0
Rory,
You crack me up!
(When you write "fingers crossed" at the end of your assignments, an evil part of me wants to retort "Mwhaa haa haaa... don't hold your breath"!!)
Jinny Morris
Ranch Hand
Joined: Apr 29, 2007
Posts: 101
posted
0
Marilyn wrote:
The key when you want to maintain the formatting is to put it into code tags (note the buttons below the text area when you post)
The only way I know to capture the console error messages is to redirect the error file output - but the resulting text file doesn't have the carats in the "right" places either ... is there a better way?
Marilyn de Queiroz
Sheriff
Joined: Jul 22, 2000
Posts: 9033
10
posted
0
To copy from a DOS prompt, you can use the little icon at the top left of the command prompt window to good advantage. Click on it and choose properties ... In the options tab, put a check in the Edit Options QuickEditMode checkbox. In the layout tab, you can change the size of the screen.
Now when you run your app, you can highlight the output by dragging the mouse and copy it by pressing "enter" (not Ctrl-C). You can paste by putting the mouse pointer inside the edit screen (anywhere) and click the right mouse button.
If you want to skip the first steps, you can use the little icon and choose "Mark", "Copy", and "Paste"
Jinny Morris
Ranch Hand
Joined: Apr 29, 2007
Posts: 101
posted
0
Marilyn -
Thank you thank you! I just tried it and it works beautifully!