Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



Home Answers Viewqa Java-Interview-Questions Java interview questions
Login         

View Questions and Answers by Category

Advertisements


 
Have Programming Question? Ask it here!
 
 
 


Janardhan yadav
Java interview questions
1 Answer(s)      3 years and 6 months ago
Posted in : Java Interview Questions


Plz answer the following questions.....

  1. The type long can be used to store values in the following range: a. -263 to 263 - 1 b. -231 to 231 - 1 c. -264 to 264 d. -232 to 232 - 1

  2. Which of the following is not a hexadecimal number? (A) 999 (B) (hex)23 (C) 0x556 (D) 0x1F2

a. (A) b. (A) & (B) c. (C) d. (A), (B) & (C)

  1. Select the invalid assignment statements from the following: (A) float x = 238.88; (B) double y = 0x443; a. (B) b. (B) & (D) c.(A) & (B) d.(A) & (C)

  2. If not assigned a value, a variable of type char has the following default value: a. '\uffff' b. " " (space) c. '\u0001' d. '\u0000'

  3. 15 & 29 = ? a. 44 b. 14 c. 13 d. 12

  4. 27 | 8 = ? a. 8 b. 27 c. 19 d. 35

  5. Identify the statements that are correct: (A) int a = 13, a>>2 = 3 (B) int b = -8, b>>1 = -4 (C) int a = 13, a>>>2 = 3 (D) int b = -8, b>>>1 = -4

a. (A), (B), (C) & (D) b. (A) & (B) c. (C) & (D) d. (A), (B) & (C)

  1. Consider the following code: int x, y, z; y = 1; z = 5; x = 0 - (++y) + z++; After execution of this, what will be the values of x, y and z? a. x = 4, y = 1, z = 5 b. x = -7, y = 1, z = 5 c. x = 3, y = 2, z = 6 d. x = 4, y = 2, z = 6

  2. What will be the result of the expression a % b when a and b are of type int and their values are a = 10 and b = 6? a. 4 b. 1.66 c. 1 d. None of these

  3. What will be the result of the expression a % b when a and b are of type int and their values are a = -17 and b = -6? a. -5 b. -23 c. None of these d. 5


Advertisement
View Answers

May 30, 2011 at 3:48 PM


1) -263 to 263 - 1, The type long is a 64-bit two's complement that can be used for long integers.

2) (A) & (B), Hexadecimal numbers start with "0x" in the Java programming language.

1)

2) \u0000, The value of a variable of type char is 16 bits of data formatted as a Unicode character.

3) 13,When written in binary format, 15 is 1111, and 29 is 11101. 1111 & 11101 is 1101, which is 13 in decimal.

4) 27, When written in binary format, 27 is 11011, and 8 is 1000. 11011 | 1000 is 11011, which is 27.

5) (A), (B) & (C), The shift operation "y1 >>> y2" is identical to "y1 >> y2" for all positive values of y1. It shifts the bits in y1 to the right by y2 positions.

1) x = 3, y = 2, z = 6, Both y and z get incremented as a result of the last statement, but y gets incremented before and z after the assignment of the calculated value to x.

2) 4, The modulus operator (%) may be used with floating-point as well as integer types. It returns the remainder of a division operation. Therefore, 10 % 6 will return 4.

5) 5, The a % b calculates the remainder when a is divided by b.



Related Tutorials/Questions & Answers:
interview - Java Interview Questions
interview  kindly guide me some interview questions of Java
java - Java Interview Questions
Helpful Java Interview questions   Need Helpful Java Interview questions
Advertisements
interview questions - Java Interview Questions
interview questions for Java  Hi Any one can u please post the interview point of questions.Warm Regards, Satish
Java Interview Questions
Java Interview Questions  Hi, Can anyone tell the urls of Java Interview Questions on roseindia.net? Thanks
Struts - Java Interview Questions
Struts Interview Questions  I need Java Struts Interview Questions and examples
help me - Java Interview Questions
interview questions java pdf   Do you have any PDF for Java Interview questions
java interview - JSP-Interview Questions
java interview  what type of questions would be asked to a 3 years experience person in java? can anyone please provide list of topics or interview questions for 3 years experience in java
jvm - Java Interview Questions
jvm  Can you provide some JVM Questions for Java Interview preparation
java questions - Java Interview Questions
java questions  HI ALL , how are all of u?? Plz send me the paths of java core questions and answers pdfs or interview questions pdfs or ebooks :) please favor me best books of interviews questions for craking
Interview Question - Java Interview Questions
Interview Question  I need Interview Questions on Java,J2EE Pls help me
java - Java Interview Questions
Java Development  I need a Job in Java Development..so preparing for it. Can anyone please guide me how to prepare and what are the common questions that can be asked at interview
hint - Java Interview Questions
hint  Dear roseindia, i want the java interview question and the corresponding question answers.   Hi Friend, Please visit... of interview questions and their answers. Thanks  thanks for your
Java - Java Interview Questions
Java  Questions on Java
java - Java Interview Questions
/interviewquestions/ Here you will get lot of interview questions...java  hello sir this is suraj .i wanna ask u regarding interview questins in java .wat normally v see in interviews (tech apptitude)is one line
java - Servlet Interview Questions
java  servlet interview questions  Hi friend, For Servlet interview Questions visit to : http://www.roseindia.net/interviewquestions/servlet/ Thanks
java - Servlet Interview Questions
Java Design Patterns Interview Questions and Answers  I need to know Java Design Patterns with the help of Interview Questions and Answers  Hi malli,GenericServlet is the super class of HttpServlet calssjava soft
java - Java Interview Questions
Java interview questions and answers for freshers  Please provide me the link of Java interview questions and answers for freshers  Hi friend,class Point{ int x, y; Point(){ System.out.println("default"
java - Java Interview Questions
java  i want to java&j2ee interview questions. Regards Akhilesh Kumar  Hi friend, I am sending you a link. This link will help you. Read for more information. http://www.roseindia.net/interviewquestions
Java - Java Interview Questions
Interview interview, Tech are c++, java,  Hi friend, Now get more information. you can lean all type interview question by following link
java - Java Interview Questions
while searching on google but if you want you can learn it in a interview preparation manner as well.. I have a java interview question URL from where you...://www.roseindia.net/java if you wanna something more on java
Interview question - Java Interview Questions
Interview question   Hi Friends, I am new to java, can u tell me what is class ,object and instance with example. For example : class raja , raja r = new raja(); ,here raja is class and r is instance
Core Java Interview questions and answers
Core Java Interview questions and answers  .... So, we have tried to create most frequently asked Core Java Interview Questions and answers in one place. These Core Java Interview Questions are supported
java interview question and answer - Java Interview Questions
java interview question and answer   sir, i want one mark java interview question and answers
Interview question - Java Interview Questions
Interview question   Hi Friends, Give me details abt synchronization in interview point of view. I mean ow to explain short and neat. Thanks
java - Java Interview Questions
java  MNC now which modal question are asked in interview
java - JSP-Interview Questions
java  hi.. snd some JSP interview Q&A and i wnt the JNI(Java Native Interface) concepts matrial thanks krishna  Hi friend, Read more information. http://www.roseindia.net/interviewquestions/jsp-interview
Java interview questions and answers
Java interview questions and answers   what is garbage collection? What is the process that is responsible for doing that in java? Ans.Reclaiming... in Java? Ans. Runtime.getRuntime().exec(?.) 5.What is the basic difference
Java - Java Interview Questions
://www.roseindia.net/java/example/java/util/HashTable.shtml Thank you for posting questions. Rose India Team
Interview Tips - Java Interview Questions
Interview Tips  Hi, I am looking for a job in java/j2ee.plz give me interview tips. i mean topics which i should be strong and how to prepare. Looking for a job 3.5yrs experience
JAVA - Java Interview Questions
JAVA  i need objective Questions and answers ( with 4 or 5 choice) in JAVA. Can anyone help me?   H1!! pl. mail your email id to asciimails@gmail.com. I will send you within 2-3 days. Krishna
interview question - Java Interview Questions
interview question  hello i want technical interview question in current year   Hi Friend, Please visit the following links: http://www.roseindia.net/interviewquestions/ http://www.roseindia.net
 

 

 

DMCA.com