Advertisements
Advertisements
प्रश्न
What message will be displayed, if the input for age is given as 20, for the following snippet?
संक्षेप में उत्तर
Advertisements
उत्तर
if (age> = 18)
{
alert ("you are eligible to get Driving licence"}
}
else
alert ("you are not eligible to get driving licence");
}shaalaa.com
Introduction of Conditional Statements in Java
क्या इस प्रश्न या उत्तर में कोई त्रुटि है?
APPEARS IN
संबंधित प्रश्न
Which of the following is not a branching statement?
<script type=“text/javascript”>
x = 6 + “3”;
document.write(x);
</script>
what will be the output?
Write the general syntax for switch statement.
Differentiate the break and continue statement.
What is if statement and write its types.
Explain switch case statement with example.
The absence of which statement leads to fall through situation in switch case statement?
Which of the following data type cannot be used with switch case construct?
Which of the following is not true with regards to a switch statement?
Rewrite the following code using single if statement.
if(code=='g')
System.out.println("GREEN");
else if(code=='G')
System.out.println("GREEN");