Telegram Group 🔥🔥🔥
Get answers in minutes
Questions answered :
48
/50
Answer verified
What will be the output of the program
public class If2
{
static boolean b1, b2;
public static void main(String [] args)
{
int x = 0;
if ( !b1 ) /* Line 7 */
{
if ( !b2 ) /* Line 9 */
{
b1 = true;
x++;
if ( 5 > 6 )
{
x++;
}
if ( !b1 )
x = x + 10;
else if ( b2 = true ) /* Line 19 */
x = x + 100;
else if ( b1 | b2 ) /* Line 21 */
x = x + 1000;
}
}
System.out.println(x);
}
}
🗓 Dec 18, 2021
votes
Megan
🌐 India
give solution please
votes
Jordan
🌐 India
can anyone share the explanation, please?
Was your question answered?
Thanks for the feedback! ✅
Want to get famous? 📸
Answer question and get 🤩 high-lighted on our homepage.