Advertisements
Advertisements
A single dimensional array has 50 elements; which of the following is the correct statement to initialize the last element to 100?
Concept: undefined >> undefined
Assertion (A): Integer class can be used in the program without calling a package.
Reason (R): It belongs to the default package java lang.
Concept: undefined >> undefined
Advertisements
Write the memory capacity (storage size) of short and float data type in bytes.
Concept: undefined >> undefined
Differentiate between if else if and switch-case statements.
Concept: undefined >> undefined
Give the output of the following code:
String P = “20”, Q = “19”,
int a = Integer .parselnt(P);
int b = Integer. valueOf(Q);
System.out.println(a+””+b);
Concept: undefined >> undefined
State the data type and value of res after the following is executed :
char ch = ‘9’;
res = Character. isDigit(ch)
Concept: undefined >> undefined
What is the difference between the linear search and the binary search technique?
Concept: undefined >> undefined
Give the output of the following:
Math.sqrt(Math.max(9, 16))
Concept: undefined >> undefined
Write a program to input 15 integer elements in an array and sort them in ascending order using the bubble sort technique.
Concept: undefined >> undefined
Design a class to overload a function series() as follows:
(a) void series (int x, int n) – To display the sum of the series given below:
x1 + x2 + x3 + ……………. xn terms
(b) void series (int p) – To display the following series:
0, 7, 26, 63 p terms.
(c) void series () – To display the sum of the series given below:
`1/2 + 1/3 + 1/4 .....1/10`
Concept: undefined >> undefined
State the number of bytes occupied by char and int data types.
Concept: undefined >> undefined
Name the following :
(i) A keyword used to call a package in the program.
(ii) Any one reference data type.
Concept: undefined >> undefined
State the data type and value of res after the following is executed:
char ch = ‘t’;
res=Character. toUpperCase(ch);
Concept: undefined >> undefined
Differentiate between searching and sorting.
Concept: undefined >> undefined
If int x [ ] = { 4, 3,7, 8, 9,10}; what are the values of p and q ?
(i) p = x.length
(ii) q = x[2] + x[5] * x[1]
Concept: undefined >> undefined
Write a difference between the functions isUpperCase() and toUpperCase().
Concept: undefined >> undefined
int res = ‘A’;
What is the value of res?
Concept: undefined >> undefined
What is a parameterized constructor?
Concept: undefined >> undefined
Write a program to input forty words in an array. Arrange these words in descending order of alphabets, using selection sort technique. Print the sorted array.
Concept: undefined >> undefined
Write the return data type of the following function:
log( )
Concept: undefined >> undefined
