What is ternary operator?



What is ternary operator?..

Answer / Viveka Nand Shukl

"The ternary operator (?:) in Java is a shorthand if-else statement that assigns the result of a conditional expression to a variable. It takes three operands: condition, expression for true, and expression for false."

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Core Java Interview Questions

What is the difference between equals() and == in java?

0 Answers  


How to optimize the javac output?

1 Answers  


Is Cegonsoft Pvt.Ltd. a good Institute?

4 Answers  


What are the features in java?

1 Answers  


Can It is possible to synchronize the constructor of a Java Class?

1 Answers  


What are the three best choices for a development environment?

1 Answers  


What is the diffrence between inner class and nested class?

1 Answers  


Catch(Exception e){ } in that what is Exception and purpose of that in that place exactly?

3 Answers  


Java violates few objected oriented concepts. Can you explain in what way?

3 Answers   Ness Technologies,


what are the diffrences between interface and abstract class?

4 Answers  


Explain cookies?

2 Answers   Canon,


Which types of exceptions are caught at compile time?

1 Answers  


Categories