Results 1 to 8 of 8
- 01-25-2009, 04:38 PM #1
Member
- Join Date
- Dec 2008
- Posts
- 55
- Rep Power
- 0
what does this line of code mean?
Hey all, been reading through a pretty advanced java game development book. I came across a line of code and I'm unable to figure out what it means (it's the syntax and the question mark confusing me, not really the commands):
Here it is:
Could anyone explain to me what that means?Java Code:isOverPauseButton = pauseArea.contains(x, y) ? true : false;
Thanks.
-
A similar question was asked yesterday. Have a look:
Shorthand ?
- 01-25-2009, 04:44 PM #3
This explains it:
Shorthand ?
Luck,
CJSLChris S.
Difficult? This is Mission Impossible, not Mission Difficult. Difficult should be easy.
- 01-25-2009, 04:46 PM #4
The fastest post in the west...
Dang it Furball... you always do that !!! Well, on the bright side, we seem to be on the same frecuency :)
Take care,
CJSLChris S.
Difficult? This is Mission Impossible, not Mission Difficult. Difficult should be easy.
- 01-25-2009, 04:46 PM #5
Member
- Join Date
- Dec 2008
- Posts
- 55
- Rep Power
- 0
Thanks guys. I'll have a look.
- 01-25-2009, 04:51 PM #6
Member
- Join Date
- Dec 2008
- Posts
- 55
- Rep Power
- 0
Interesting... it would seem that in my example above the whole ternary operator isn't even necessary (since it's testing the .contains for true or false, it might as well just say:
right?)Java Code:isOverPauseButton = pauseArea.contains(x, y);
-
-
Similar Threads
-
line feed in CSV
By javaplus in forum New To JavaReplies: 2Last Post: 01-24-2008, 03:46 PM -
What does this line of code mean?
By naxalyte in forum New To JavaReplies: 1Last Post: 11-23-2007, 09:28 PM -
Reading in data from file line by line
By bluekswing in forum New To JavaReplies: 1Last Post: 10-02-2007, 12:19 AM -
Generating Code Automatically Using Custom code Template In Eclipse
By JavaForums in forum EclipseReplies: 1Last Post: 04-26-2007, 03:52 PM


LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks