Friday, October 06, 2006

?: Shorthand for if-then statement

Example

Object = (Service != null)
? serviceobj.setValue(10)
: serviceobj = new ServiceClass();

No comments: