30 solutions available
Question 1(i)If ((a > b) && (a > c)), then which of the following statement is true?a is the largest number.b is the largest number.c...
Question 1(ii)Which of the following might make the Java compiler report a syntax error in a particular line of a program?The program is typed in the...
Question 1(iii)A class is :an object factorya blueprint to create objectsa specification for objectsAll of the above
Question 1(iv)Assume x = 1 with the following code snippet:int y = --x;Which one of the following is true?x = 1, y = 1x = 0; y = 0x = 1; y = 0x = 0;...
Question 1(v)Consider the following code snippet:float x = 8.25F; int y; y = (int)x;What are the values of x and y?x = 8.25, y = 8x = 8.0, y = 8.0x =...
Question 1(vi)Parameters in method definition are calledactual parametersformal parametersinformal parametersvoid parameters
Question 1(vii)Give the output of Math.ceil(-0.6)-1.6-1.5-1.0-0.0
Question 1(viii)Which operator cannot be used with if-else statement?<=||&&? :
Question 1(ix)By default, floating literal isdoublefloatintlong
Question 1(x)JVM converts bytecode directly intomachine codeanother byte codehigh level codeNone of these
Question 1(xi)Which of the following statements is true?Binary search is less efficient than linear search.Binary search is more efficient than...
Question 1(xii)Which element is num[9] of array num?8th9th10th11th
Question 1(xiii)What is the value returned by function compareTo( ), if the invoking string is less than the string compared?zerovalue less than...
Question 1(xiv)............... class is used to convert a primitive data type to its corresponding object.StringWrapperSystemMath
Question 1(xv)This access specifier can be accessed only by the subclass in other package or any class within the same...
Question 1(xvi)Which of these data type value is returned by equals() method of string class?charintbooleanAll of these
Question 1(xvii)Assertion (A) Class initialisation is the explicit initialisation of class fields to values.Reason (R) Each class field explicitly...
Question 1(xviii)Read the following text and choose the correct answer:Java constructor overloading is a technique in which a class can have any...
Question 1(xix)Assertion (A) JVM is a Java interpreter loaded in the computer memory as soon as Java is loaded.Reason (R) JVM is different for...
Question 1(xx)String is ............... in Java.interfacemutablemethodimmutable
Question 2(i)What will be the output of the following statements?int a = 3; System.out.println(" " + (1 + a)); System.out.println(" " + 1 + a);
Question 2(ii)Find the output of the following code.String str = "I Love My Family"; System.out.println(Integer.toString(str.length()));...
Question 2(iii)Write a Java statement for the following mathematical expression :V = 13\dfrac{1}{3}31πr2h
Question 2(iv)Write the value of n and m after execution of the following code.int m; int n; m = 5; n = (5 * ++m) % 3; System.out.println("n = " + n...
Question 2(v)Predict the output(a) Math.pow(3.4, 2) + 2 * Math.sqrt(64)(b) Math.ceil(3.4) + 2 * Math.floor(3.4) + 2
Question 2(vi)If a = 24, b = 15, find the value of:a += b++ * 5 / a++ + b
Question 2(vii)Give the prototype of a function search, which receives a sentence sentc and a word wrd and returns 1 or 0.
Question 2(viii)How many times will the following loop execute?int x = 2, y = 50; do { ++x; y -= x++; } while (x <= 10); return y;
Question 2(ix)If int a[] = {7, 3, 4, 8, 9, 2}; what are the values of x and y?(a) x = a[1] * a[0] + a[3](b) y = a.length
Question 2(x)Write the return types of the following library functions:(a) isLetterOrDigit(char)(b) replace(char, char)