30 solutions available
Question 1(i)Name the feature of java depicted in the below picture.EncapsulationInheritanceAbstractionPolymorphism
Question 1(ii)The expression which uses >= operator is known as:relationallogicalarithmeticassignment
Question 1(iii)Ternary operator is a:logical operatorarithmetic operatorrelational operatorconditional operator
Question 1(iv)When primitive data type is converted to a corresponding object of its class, it is called:BoxingUnboxingexplicit type...
Question 1(v)The number of bytes occupied by a character array of 10 elements.20 bytes60 bytes40 bytes120 bytes
Question 1(vi)The method of Scanner class used to accept a double value is:nextInt()nextDouble()next()nextInteger()
Question 1(vii)Among the following which is a keyword:everyallcaseeach
Question 1(viii)The output of Math.round(6.6) + Math.ceil(3.4) is:9.011.010.011
Question 1(ix)Name the type of error, if any in the following statement:System.out.print("HELLO")logicalno errorruntimesyntax
Question 1(x)Java statement to access the 5th element of an array is:X[4]X[5]X[3]X[0]
Question 1(xi)The output of "Remarkable".substring(6) is:markemarkmarkaable
Question 1(xii)Which of the following is the wrapper class for the data type char?StringCharCharacterFloat
Question 1(xiii)Name the package that contains wrapper classes:java.langjava.utiljava.iojava.awt
Question 1(xiv)Constructor overloading follows which principle of Object Oriented programming?InheritancePolymorphismAbstractionEncapsulation
Question 1(xv)Which of the following is a valid Integer constant:i. 4ii. 4.0iii. 4.3fiv. "four"Only ii and iiiii and ivi and ii
Question 1(xvi)The method compareTo() returns ............... when two strings are equal and in lowercase :true01false
Question 1(xvii)Assertion (A): In Java, statements written in lower case letter or upper case letter are treated as the same.Reason (R): Java is a...
Question 1(xviii)Read the following text, and choose the correct answer:A class encapsulate Data Members that contains the information necessary to...
Question 1(xix)Assertion (A): Call by value is known as pure method.Reason (R): The original value of variable does not change as operation is...
Question 1(xx)What will be the output for:System.out.print(Character.toLowerCase('1')); 01Atrue
Question 2(i)Write the Java expression for (p + q)2.
Question 2(ii)Evaluate the expression when the value of x = 2:x = x++ + ++x + x
Question 2(iii)The following code segment should print "You can go out" if you have done your homework (dh) and cleaned your room (cr). However, the...
Question 2(iv)Sam executes the following program segment and the answer displayed is zero irrespective of any non zero values are given. Name the...
Question 2(v)How many times will the following loop execute? What value will be returned?int x = 2; int y = 50; do{ ++x; y -= x++; } while(x <=...
Question 2(vi)Write the output of the following String methods:(a) "ARTIFICIAL".indexOf('I')(b) "DOG and PUPPY".trim().length()
Question 2(vii)Name any two jump statements.
Question 2(viii)Predict the output of the following code snippet:String a = "20"; String b = "23"; int p = Integer.parseInt(a); int q =...
Question 2(ix)When there is no explicit initialization, what are the default values set for variables in the following cases?(a) Integer variable(b)...
Question 2(x)int P[ ] = {12, 14, 16, 18};int Q[ ] = {20, 22, 24};Place all elements of P array and Q array in the array R one after the other.(a)...