aspose file tools
The moose likes Beginning Java and the fly likes A simple question Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » Beginning Java
Reply Bookmark "A simple question" Watch "A simple question" New topic
Author

A simple question

danesh far
Greenhorn

Joined: Nov 25, 2004
Posts: 15
Hi,could you please let me know what the following ststement says:

theDX = theDX > MAX_V ? MAX_V : theDX;
[ December 09, 2004: Message edited by: Ernest Friedman-Hill ]
Ernest Friedman-Hill
author and iconoclast
Marshal

Joined: Jul 08, 2003
Posts: 24057
    
  13

I edited your post to remove some superfluous formatting.

The ? and : characters together are the "ternary operator." It's basically a shorthand way of writing "if/then". Another way to write exactly the same thing would be



Of course, written out like this, the "else" part is redundant.


[Jess in Action][AskingGoodQuestions]
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: A simple question