Teachers and Examiners (CBSESkillEduction) collaborated to create the Fundamentals of Java Class 11 MCQ. All the important Information are taken from the NCERT Textbook Information Technology (802) class 11.
Fundamentals of Java Class 11 MCQ
1. NetBeans is an IDE using which we can develop ___________ in Java.
a. GUI application
b. CUI application
c. BW application
d. None of the above
2. NetBeans provides various components used to create a GUI front-end interface like ___________.
a. jTextArea
b. jLabel
c. jButton
d. All of the above
3. GUI components’ __________ is controlled by their properties and methods.
a. Appearance
b. Behavior
c. Both a) and b)
d. None of the above
4. We should use meaningful names for controls on the _________ in the code. It makes programming convenient.
a. Form
b. Variables
c. Both a) and b)
d. None of the above
5. Some useful Data Types supported in Java are ___________.
a. Int & Boolean
b. Double
c. Char
d. All of the above
6. String is an _________ type supported in Java.
a. Object
b. Constraint
c. Class
d. None of the above
7. A variable must be declared _____________.
a. After it can be used
b. Between it can be used
c. Before it can be used
d. None of the above
8. What are the different operators used in Java _________.
a. Logical Operator
b. Conditional Operator
c. Comparison Operator
d. All of the above
9. The __________ selects among a set of statements depending on the value of a controlling expression.
a. If Statement
b. For Statement
c. While Statement
d. None of the above
10. If else statement is also known as ________.
a. Control statement
b. Structure statement
c. Program statements
d. All of the above
11. An IF statement in Java is also a _______ statement.
a. Number
b. conditional
c. String
d. None of the above
12. In Java, an ELSE statement needs to come after a _________ statement.
a. IF
b. ELSE IF
c. IF or ELSE IF
d. None of the above
13. It is required to define an IF statement code between two braces.
a. False
b. True
c. Some time True and Some time False
d. None of the above
14. An ELSE statement’s code may be enclosed in braces.
a. FALSE
b. TRUE
c. Some time True and Some time False
d. None of the above
15. Without an IF statement, an ELSE or ELSE-IF statement in Java cannot occur.
a. FALSE
b. TRUE
c. Some time True and Some time False
d. None of the above
16. if the condition is false in if condition, which of the following will be true.
a. IF Statement will be executed
b. ELSE Statement is executed.
c. IF and ELSE both will not execute.
d. IF and ELSE both will execute.
17. How many lines of code can be written inside an IF, ELSE, or IF-ELSE block in Java?
a. 25
b. 72
c. 105
d. None of the above
18. In which of the following situations is an IF-ELSE statement preferable to a SWITCH statement?
a. Checking multiple condition
b. Checking for Less-than condition
c. Checking for Ranges
d. All of the above
19. How many ELSE-IF statements can be present between the beginning IF and the closing ELSE statements?
a. 44
b. 55
c. 320
d. None of the above
20. Select the proper Java IF statement syntax from the list below.
a. if(condition) //statement
b. if(condition){ //statement}
c. if(condition){ //statement1 //statement2}
d. All of the above
21. What does the Java programme with IF-ELSE statements produce?
if(TRUE)
System.out.println(“True”);
else
System.out.println(“False”);
a. True
b. False
c. Compiler error
d. None
22. What is the output of the Java program?
int a=10;
if(a==9)
System.out.println(” My “);
System.out.println(“School”);
else
System.out.println(“My Class”);
a. My School
b. My Class
c. Compiler error
d. None of the above
23. What is the output of the Java program?
String name1=”My School”, name2=”My Class”;
if(name1 == “My School”)
{
System.out.print(“My School “);
System.out.println(“My Class”);
}
if(name2 == “No Class”)
{
System.out.println(“My Class”);
}
a. My School My Class
b. My School My Class My Class
c. Compiler error
d. None of the above
24. What is the output of the Java program?
String name=”Anurag”;
if(name == “Anand”)
{
System.out.print(“Anurag”);
}
System.out.println(“Computer Science”);
a. Anurag Computer Science
b. Anurag
c. Computer Science
d. Compiler error
25. What is the output of the Java program with ELSE-IF statements?
int marks=90;
if(marks >= 80)
System.out.println(“Distinction”);
else if(marks >=33)
System.out.println(“Pass”);
else
System.out.println(“Fail”);
a. Distinction
b. Pass
c. Fail
d. Compiler error
26. What is the output of Java program below?
float temp = 97.3;
if(temp > 97.3)
{
System.out.println(“High Temperature”);
}
else
{
System.out.println(“Temperature”);
}
a. High Temperature
b. Temperature
c. Compiler error
d. None of the above
27. What is the output of the Java program?
int marks = 91;
if(marks > 32)
{
if(age <= 100)
{
System.out.println(“Pass”);
}
}
else
{
System.out.println(“Fail”);
}
a. Pass
b. Fail
c. Compiler error
d. None of the above
28. What is the output of the Java program?
int marks=55;
if(marks > 55);
System.out.print(“Pass “);
System.out.println(“Fail”);
a. Fail
b. Pass
c. Pass Fail
d. Compiler error
29. What is the result of the IF statement in a Java programme?
if(true)
{
break;
System.out.println(“School”);
}
a. No Output
b. School
c. Compiler error
d. None of the above
30. Java is a ______ programming language.
a. Procedure Oriented
b. Object-Oriented
c. Practical
d. All of the above
31. The code in the Java programming language is put inside ___________.
a. Blocks
b. Methods
c. Classes, Interfaces
d. All the above
32. What file extension is associated with the Java class source code?
a. .jpp
b. .jsp
c. .java
d. None of the above
33. What file extension is associated with compiled Java class files?
a. .jpp
b. .java
c. .class
d. .clear
34. In Java, the keyword used to declare a class is _________.
a. Function
b. Method
c. class
d. Java
35. A Java class can contain___________.
a. Variables
b. Methods, Constructors
c. Inner Classes (A class inside another class)
d. All of the above
36. In Java, the word ________ is used to create a new object.
a. java
b. new
c. class
d. function
37. In Java, an object is created at _________ time.
a. Assembling time
b. Run time
c. Compile-time
d. None of the above
38. Select the appropriate Java class declaration syntax from the list below.
a.
class CLASSNAME
{
}
b.
CLASSNAME class
{
}
c.
class CLASSNAME;
{
}
d.
Class CLASSNAME
{
}
Show Answer ⟶39. Pick the appropriate method for producing an object of the class listed below.
class Table
{
Table(){System.out.println(“Table Created”);}
}
a. Table t = new Table;
b. Table t = new Table();
c. Table() t = new Table();
d. None of the above
40. A control statement in Java is called a _________ SWITCH case statement.
a. Iteration
b. Loop
c. Selection
d. Jump
41. Which is the Java language equivalent of SWITCH?
a. break, continue
b. for, while
c. if, else
d. goto, exit
42. What keywords are needed in Java to implement a SWITCH case?
a. switch, case
b. default
c. break
d. All of the above
43. Select the proper SWITCH statement syntax for Java from the list below.
a.
switch(input)
{
case constant1: //statements; break;
case constant2: //statements; break;
default: //statements;
};
b.
switch(input)
{
case constant1: //statements; break;
case constant2: //statements; break;
default: //statements;
}
c.
switch(input)
{
case constant1: //statements; break;
case constant2: //statements; break;
default case: //statements;
};
d.
switch(input)
{
case constant1: //statements; break;
case constant2: //statements; break;
default case: //statements;
}
44. What is the result of the following Java application with SWITCH?
int a=10;
switch(a)
{
case 10: System.out.println(“Welcome”);
}
a. No output
b. Welcome
c. Compiler error as there is no BREAK.
d. None
45. What does the Java programme below produce?
String animal = “Horse”;
switch(animal)
{
break: System.out.println(“DOMESTIC”);
}
a. No output
b. Horse
c. DOMESTIC
d. Compiler error
Employability Skills Class 11 Notes
- Unit 1 : Communication Skills Class 11 Notes
- Unit 2 : Self-Management Skills Class 11 Notes
- Unit 3 : Information and Communication Technology Skills Class 11 Notes
- Unit 4 : Entrepreneurial Skills Class 11 Notes
- Unit 5 : Green Skills Class 11 Notes
Employability Skills Class 11 MCQ
- Unit 1 : Communication Skills Class 11 MCQ
- Unit 2 : Self-Management Skills Class 11 MCQ
- Unit 3 : Information and Communication Technology Skills Class 11 MCQ
- Unit 4 : Entrepreneurial Skills Class 11 MCQ
- Unit 5 : Green Skills Class 11 MCQ
Employability Skills Class 11 Questions and Answers
- Unit 1 : Communication Skills Class 11 Questions and Answers
- Unit 2 : Self-Management Skills – III
- Unit 3 : Information and Communication Technology Skills Class 11 Questions and Answers
- Unit 4 : Entrepreneurial Skills Class 11 Questions and Answers
- Unit 5 : Green Skills Class 11 Questions and Answers
Information Technology Class 11 Notes
- Unit -1 : Computer Organization Class 11 Notes
- Unit -2 : Networking And Internet Class 11 Notes
- Unit-3 : Office Automation Tools Class 11 Notes
- Unit-4: RDBMS Class 11 Notes
- Unit-5: Fundamentals of Java Class 11 Notes
Information Technology Class 11 MCQ
- Unit -1 : Computer Organization Class 11 MCQ
- Unit -2 : Networking And Internet Class 11 MCQ
- Unit-3 : Office Automation Tools Class 11 MCQ
- Unit-4: RDBMS Class 11 MCQ
- Unit-5: Fundamentals of Java Class 11 MCQ