Practice question
3 marksState three differences between a constructor and a method.
Class 11 Computer ScienceConstructorsMediumShort answer
Every question, by chapter, year, marks and type.Every question, filterable by class, subject, chapter, topic, year, marks, difficulty, type and source. The filters live in the address, so any view you build can be shared.
64 questions
Practice question
3 marksState three differences between a constructor and a method.
Class 11 Computer ScienceConstructorsMediumShort answer
Practice question
3 marksEvaluate the expression 10 + 5 * 2 - 8 / 4 in Java and explain the order of evaluation.
Class 11 Computer ScienceOperators and Expressions in JavaMediumNumerical
Practice question
3 marksWhat is method overloading? State the conditions under which two methods are said to be overloaded.
Class 11 Computer ScienceUser-Defined MethodsMediumShort answer
Practice question
3 marksWrite a Java program segment to print an inverted right-angled triangle of stars with n rows, the first row having n stars.
Class 11 Computer ScienceNested LoopsMediumApplication based
Practice question
3 marksState three differences between the if-else construct and the switch-case construct.
Class 11 Computer ScienceConditional ConstructsMediumShort answer
Practice question
3 marksWhat is the this keyword and when is it needed?
Class 11 Computer ScienceEncapsulation and Class as a User-Defined TypeMediumShort answer
Practice question
3 marksWhat is constructor overloading? Give one situation in which it is useful.
Class 11 Computer ScienceConstructorsMediumShort answer
Practice question
3 marksWhat is the output of: System.out.println(10 / 3); System.out.println(10 % 3); System.out.println(10.0 / 3);
Class 11 Computer ScienceValues and Data TypesMediumNumerical
Practice question
3 marksReduce the Boolean expression X·Y + X·Y′ using the laws of Boolean algebra.
Class 11 Computer ScienceBoolean AlgebraMediumNumerical
Practice question
3 marksWhat is the output of: int a = 10, b = 3; System.out.println(a > b && a % b == 1);
Class 11 Computer ScienceOperators and Expressions in JavaMediumNumerical
Practice question
3 marksState three differences between procedural and object-oriented programming.
Class 11 Computer ScienceIntroduction to Object-Oriented ProgrammingMediumShort answer
Practice question
3 marksWhat is short-circuit evaluation, and give one practical use of it.
Class 11 Computer ScienceOperators and Expressions in JavaMediumShort answer
Practice question
3 marksName the access specifiers of Java and state the visibility each gives.
Class 11 Computer ScienceEncapsulation and Class as a User-Defined TypeMediumShort answer
Practice question
3 marksState the converse, inverse and contrapositive of "If it rains, the match is cancelled", and say which is logically equivalent to the original.
Class 11 Computer SciencePropositional LogicMediumShort answer
Practice question
3 marksWhat is the output of: String s = "Computer"; System.out.println(s.substring(2, 5) + s.length() + s.charAt(0));
Class 11 Computer ScienceString HandlingMediumNumerical
Practice question
2 marksWhat is a constructor? State three of its characteristics.
Class 11 Computer ScienceConstructorsEasyShort answer
Practice question
3 marksWhat is the output of: String s = "Examination"; System.out.println(s.length() + " " + s.substring(0, 4) + " " + s.toUpperCase().charAt(2));
Class 11 Computer ScienceString HandlingMediumNumerical
Practice question
3 marksWrite a Java program segment to find the average of the elements of an integer array a of size n.
Class 11 Computer ScienceArraysMediumApplication based
Practice question
3 marksDistinguish between a primitive type and a reference type in Java, with two examples of each.
Class 11 Computer ScienceValues and Data TypesMediumShort answer
Practice question
3 marksSimplify the Boolean expression (X + Y)(X + Y′).
Class 11 Computer ScienceBoolean AlgebraMediumNumerical