Quiz Space

Programming Concepts using Java Quiz 1: 5 June 2022 (May 2022 term)

Question 1

+3 marksOne correct option
  1. A

    A-V, B-IV, C-I, D-VI

  2. B

    A-VI, B-II, C-III, D-V

  3. C

    A-V, B-II, C-I, D-VI

  4. D

    A-VI, B-IV, C-III, D-V

Question 2

+3 marksOne correct option

Consider the Java code given below.

java
1 interface Transferable{
2 public void transfer();
3 }
4 interface Receivable{
5 public void receive();
6 public default void sanityCheck() {
7 System.out.println("Checks receipt details");
8 }
9 }
10 class BankAccount implements Transferable, Receivable{
11 public void transfer() {
12 System.out.println("Transfers money");
13 }
14 }

Choose the correct option

  1. A
  2. B
  3. C
  4. D

Question 3

+3 marksOne correct option

Consider the Java code given below.

java
class Tree{
String name;
String scientificName;
int avg_height;
public Tree(String n, String sn, int h){
name = n;
scientificName = sn;
avg_height = h;
}
***---------------***
* CODE SEGMENT *
***---------------***
}
public class Test{
public static void main(String[] args){
Tree t = new Tree("Neem", "Azadirachta indica", 20);
System.out.println(t);
}
}

Choose the correct option to fill the CODE SEGMENT so that the output is:

Neem:Azadirachta indica:20

  1. A
  2. B
  3. C
  4. D

12 more questions in this paper

Sign in with Google — it is free — to see every question with its answer and explanation, practise it in learning mode, or take it as a timed mock test.

More on the Java Quiz 1 5 Jun 2022 paper

The IIT Madras BS Programming Concepts using Java (Java) Quiz 1 paper sat on 5 Jun 2022, in the May 2022 term: 15 questions for 50 marks in 120 minutes. The first 3 questions are below. Sign in with Google — it is free — to see the whole paper with its answers and explanations, in learning mode or as a timed mock test.

FeatureJava Quiz 1 5 Jun 2022 at a glance
TermMay 2022 term
SubjectProgramming Concepts using Java
Course codeBSCS2005
Questions15
Marks50
Duration120 min
MCQ12
MSQ3
Official paperIIT M DIPLOMA QUIZ1 EXAM QPE1 05 Jun 2022 IBA
Negative markingNo negative marking.
Updated

Same Quiz 1, other subjects

More Java