Call
whatsapp
9447387064 | 9847003556
0471-2335855 | 8089080088 | 0471-2334855
9447387064 | 9847003556
0471-2335855 | 8089080088 | 0471-2334855
Cisco Training in Trivandrum, Trinity Technologies

No.1 Training Institute in Kerala

JAVA QUESTIONS : PART 2

Which of the following can be operands of arithmetic operators?

Numeric
Boolean
Characters
Both Numeric & Characters

SHOW ANSWER

Modulus operator, %, can be applied to which of these?

Integers

Floating – point numbers
Both Integers and floating – point numbers.
None of the mentioned

SHOW ANSWER

 With x = 0, which of the following are legal lines of Java code for changing the value of
x to 1?
1. x++;
2. x = x + 1;
3. x += 1;
4. x =+ 1;

1, 2 & 3
1 & 4
1, 2, 3 & 4
3 & 2
SHOW ANSWER

Decrement operator, ??, decreases value of variable by what number?

1

2

3

4

SHOW ANSWER

What is the output of relational operators?

Integer
Boolean
Characters
Double
SHOW ANSWER

Which of these is returned by “greater than”, “less than” and “equal to” operators?

Integers
Floating – point numbers
Boolean
None of the mentioned
SHOW ANSWER

Which of these operators can skip evaluating right hand operand?

!
|
&
&&
SHOW ANSWER

Which of these have highest precedence?

()
++
*

>>

SHOW ANSWER

Which of these selection statements test only for equality?

if
switch
if & switch
None of the mentioned
SHOW ANSWER

Which of these are selection statements in Java?

if()
for()
continue
break
SHOW ANSWER

Which of these jump statements can skip processing remainder of code in its body 
for a particular iteration?

break
return
exit
continue
SHOW ANSWER

Which of these keywords is used to make a class?

class
struct
int
None of the mentioned
SHOW ANSWER

Which of these operators is used to allocate memory for an object?

malloc
alloc
new
give
SHOW ANSWER
BACK | NEXT
TRINITY SOFTWARE SOLUTIONS,IInd floor, Radheyam Towers, Gandhari Amman Kovil Road, Pulimood, Trivandrum - 1
0471-2334855 | 2335855 | 9447387064 | 9847003556 info@trinitytechnology.in