adplus-dvertising

Welcome to the Operators and Control Statements MCQs Page

Dive deep into the fascinating world of Operators and Control Statements with our comprehensive set of Multiple-Choice Questions (MCQs). This page is dedicated to exploring the fundamental concepts and intricacies of Operators and Control Statements, a crucial aspect of Java Programming. In this section, you will encounter a diverse range of MCQs that cover various aspects of Operators and Control Statements, from the basic principles to advanced topics. Each question is thoughtfully crafted to challenge your knowledge and deepen your understanding of this critical subcategory within Java Programming.

frame-decoration

Check out the MCQs below to embark on an enriching journey through Operators and Control Statements. Test your knowledge, expand your horizons, and solidify your grasp on this vital area of Java Programming.

Note: Each MCQ comes with multiple answer choices. Select the most appropriate option and test your understanding of Operators and Control Statements. You can click on an option to test your knowledge before viewing the solution for a MCQ. Happy learning!

Operators and Control Statements MCQs | Page 30 of 38

Explore more Topics under Java Programming

Q291.
What is the output of the Java program?
int a=10;
if(a==9)
  System.out.println("OK ");
  System.out.println("MASTER");     
else
  System.out.println("BYE");
Discuss
Answer: (c).Compiler error
Q292.
What is the output of the Java program?
String name1="FOX", name2="DOG";
if(name1 == "FOX")
  System.out.print("FOX ");
  System.out.println("GOOD");     
if(name2 == "CAT")
  System.out.println("DINO");
Discuss
Answer: (b).FOX GOOD
DINO
Q293.
What is the output of the Java program?
String name="dino";
if(name == "dino")
 System.out.print("DINO");
System.out.println("GOOD");
Discuss
Answer: (c).GOOD
Q294.
What is the output of the Java program with IF-ELSE-IF statements?
int marks=55;
if(marks >= 80)
  System.out.println("DISTINCTION");
else if(marks >=35)
  System.out.println("PASS");
else
  System.out.println("FAIL");
Discuss
Answer: (b).PASS
Q295.
What is is the output of the Java program?
int marks=85;
if(marks >= 80)
  System.out.println("DISTINCTION");
else if(marks >=35)
  System.out.println("PASS");
Discuss
Answer: (a).DISTINCTION
Q296.
What is the output of Java program below?
float temp = 98.4f;
if(temp > 98.4)
{
  System.out.println("SUMMER");
}
else
{
  System.out.println("UNKNOWN");
}
Discuss
Answer: (a).SUMMER
Q297.
What is the output of the Java program?
long num = 123L;
if(num > 123)
{
 System.out.println("TIGER");
}
else
{
 System.out.println("BIRD");
}
Discuss
Answer: (b).BIRD
Q298.
What is the output of the Java program?
int horses = 10;
int camels = 5;
if(horses > 5)
{
  if(camels > 3)
  {
    System.out.println("FOREST");
  }
}
else
{
   System.out.println("CITY");
}
Discuss
Answer: (a).FOREST
Q299.
What is the output of the Java program?
int horses = 10;
int camels = 5;
if(horses < 5)
{
  System.out.println("TOWN");
}
else if(horses >=5)
  System.out.print("FOREST ");
  System.out.println("AMAZON");
else
  System.out.println("UNKNOWN");
Discuss
Answer: (d).Compiler error
Q300.
What is the output of the Java program?
int marks=29;
if(marks > 29);
   System.out.print("PASS ");
System.out.println("RANK");
Discuss
Answer: (c).PASS RANK

Suggested Topics

Are you eager to expand your knowledge beyond Java Programming? We've curated a selection of related categories that you might find intriguing.

Click on the categories below to discover a wealth of MCQs and enrich your understanding of Computer Science. Happy exploring!