in Education by
On applying Left shift operator, <<, on integer bits are lost one they are shifted past which position bit? (a) 1 (b) 32 (c) 33 (d) 31 I had been asked this question in an interview for job. The doubt is from Bitwise Operators in chapter Operators and Control Statements of Java Select the correct answer from above options Java questions and answers, Java questions pdf, Java question bank, Java questions and answers pdf, mcq on Java pdf, Java questions and solutions, Java mcq Test , Interview Java questions, Java Questions for Interview, Java MCQ (Multiple Choice Questions),Core Java Questions, Core Java MCQ,core java interview questions for experiencedcore java interview questions for 3 years experience,java programming questions,core java interview questions for freshers,java interview questions and answers for freshers, java programming questions and answers pdf, java interview questions for beginners

1 Answer

0 votes
by
 
Best answer
Right option is (d) 31 Explanation: The left shift operator shifts all of the bits in a value to the left specified number of times. For each shift left, the high order bit is shifted out and lost, zero is brought in from the right. When a left shift is applied to an integer operand, bits are lost once they are shifted past the bit position 31.

Related questions

0 votes
    How many bits are in a single IP address? (a) 8 (b) 16 (c) 32 (d) 64 I have been ... freshers, java programming questions and answers pdf, java interview questions for beginners...
asked Oct 25, 2021 in Education by JackTerrance
0 votes
    Which of these method is used to calculate number of bits required to hold the BitSet object? (a) ... programming questions and answers pdf, java interview questions for beginners...
asked Oct 25, 2021 in Education by JackTerrance
0 votes
    Which of these is a super class of wrappers Double & Integer? (a) Long (b) Digits (c) Float ( ... java programming questions and answers pdf, java interview questions for beginners...
asked Oct 25, 2021 in Education by JackTerrance
0 votes
    Which of the following methods is a method of wrapper Integer for obtaining hash code for the invoking object ... questions and answers pdf, java interview questions for beginners...
asked Oct 25, 2021 in Education by JackTerrance
0 votes
    Which of these is a super class of wrappers Long, Character & Integer? (a) Long (b) Digits (c) ... programming questions and answers pdf, java interview questions for beginners...
asked Oct 25, 2021 in Education by JackTerrance
0 votes
    Which of the following is method of wrapper Integer for converting the value of an object into int? (a ... questions and answers pdf, java interview questions for beginners...
asked Oct 25, 2021 in Education by JackTerrance
0 votes
    Which of these method of InputStream is used to read integer representation of next available byte input? (a) ... questions and answers pdf, java interview questions for beginners...
asked Oct 25, 2021 in Education by JackTerrance
0 votes
    Which of these method is used to make a bit zero specified by the index? (a) put() (b) set() ... java programming questions and answers pdf, java interview questions for beginners...
asked Oct 25, 2021 in Education by JackTerrance
0 votes
    Which of these can be returned by the operator &? (a) Integer (b) Boolean (c) Character (d) ... java programming questions and answers pdf, java interview questions for beginners...
asked Oct 28, 2021 in Education by JackTerrance
0 votes
    Modulus operator, %, can be applied to which of these? (a) Integers (b) Floating - point numbers ... programming questions and answers pdf, java interview questions for beginners...
asked Oct 28, 2021 in Education by JackTerrance
0 votes
    Which operator is used to invert all the digits in a binary representation of a number? (a) ~ (b) ... programming questions and answers pdf, java interview questions for beginners...
asked Oct 26, 2021 in Education by JackTerrance
0 votes
    Which operator is used by Java run time implementations to free the memory of an object when it is no ... questions and answers pdf, java interview questions for beginners...
asked Oct 26, 2021 in Education by JackTerrance
0 votes
    Decrement operator, −−, decreases the value of variable by what number? (a) 1 (b) 2 (c) 3 (d ... java programming questions and answers pdf, java interview questions for beginners...
asked Oct 28, 2021 in Education by JackTerrance
0 votes
    Which one of the following is not an access modifier? (a) Public (b) Private (c) Protected (d) ... programming questions and answers pdf, java interview questions for beginners...
asked Oct 26, 2021 in Education by JackTerrance
...