This week's book giveaway is in the General Computing forum.
We're giving away four copies of Arduino in Action and have Martin Evans, Joshua Noble, and Jordan Hochenbaum on-line!
See this thread for details.
The moose likes HTML, CSS and JavaScript and the fly likes 2 easy questions Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Reply Bookmark "2 easy questions" Watch "2 easy questions" New topic
Author

2 easy questions

colin shuker
Ranch Hand

Joined: Apr 11, 2005
Posts: 712
ADDITION
I don't understand exactly whats going on here.
If I do 37+79, I get the result 116, which is Fine.

If I do 037+079, I get 110, which I don't understand.
So next I tried...
alert("037+079="+037+"+"+079);
which gives 037 as 31, and 079 as 79, hence the 110.
I thought it could be octal at first, but it isn't, and
it's not hex either.
Can someone explain why 037 is 031, and 079 is 079?
Thanks

Secondly
DOUBLE CLICKING ON TEXT FIELD
I had a question, which said when double clicking on a text field,
which event occurs.
Well its either Focus or Select.
But I then wrote a program, and when you double click a text field...
Sometimes it highlights, and its a SELECT, but other times, its just a
FOCUS.

I guess the answer is FOCUS, but that is a vague question in my opinion.

Thanks very much if you can help with either of these.
[ June 18, 2006: Message edited by: Bear Bibeault ]
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 56528
    
  14

9 is not an octal digit.


[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About Bear]
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: 2 easy questions
 
Similar Threads
JDialog and WindowFocusListener Not working the way I think it should.
JTree: How to update nodes?
Populate the 'current' JTextField via a button/label
Select JTextField value in a DefaultCellEditor
Pasting by using mouse