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


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Beginning Java
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: 24187
    
  34

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://aspose.com/file-tools
 
subject: A simple question