Sample Questions Best site for GRE, LSAT, SAT, GMAT, TOEFL, CCNA, CCSA and interview sample questions  

Technical Sample Questions : C |  C++ |  Oracle |  Java | Unix |  Operating Systems |  Data Structure

Java Sample Questions ›› Java questions

Technical General Java Sample Questions

  1. How does Java handle integer overflows and underflows?

    Answer: It uses those low order bytes of the result that can fit into the size of the type allowed by the operation.

  2. What is the difference between the >> and >>> operators?

    Answer: The >> operator carries the sign bit when shifting right. The >>> zero-fills bits that have been shifted out.

  3. Is sizeof a keyword?

    Answer: The sizeof operator is not a keyword.

  4. Does garbage collection guarantee that a program will not run out of memory?

    Answer: Garbage collection does not guarantee that a program will not run out of memory. It is possible for programs to use up memory resources faster than they are garbage collected. It is also possible for programs to create objects that are not subject to garbage collection.

  5. Can an object's finalize() method be invoked while it is reachable?

    Answer: An object's finalize() method cannot be invoked by the garbage collector while the object is still reachable. However, an object's finalize() method may be invoked by other objects.

  6. What value does readLine() return when it has reached the end of a file?

    Answer: The readLine() method returns null when it has reached the end of a file.

  7. Can a for statement loop indefinitely?

    Answer: Yes, a for statement can loop indefinitely. For example, consider the following: for(;;);

  8. To what value is a variable of the String type automatically initialized?

    Answer: The default value of an String type is null.

  9. What is a task's priority and how is it used in scheduling?

    Answer: A task's priority is an integer value that identifies the relative order in which it should be executed with respect to other tasks. The scheduler attempts to schedule higher priority tasks before lower priority tasks.

  10. What is the range of the short type?

    Answer: The range of the short type is (215) to 215 - 1.

« Previous || Next »

Java Sample Question Number: 1-10| 11-20| 21-30| 31-40| 41-50| 51-60| 61-70| 71-80| 81-90| 91-100| 101-110| 111-120| 121-130| 131-140| 141-150| 151-160| 161-170| 171-180| 181-190| 191-200| 201-210| 211-220| 221-230| 231-240| 241-250| 251-260| 261-270| 271-280| 281-290| 291-300| 301-310| 311-320| 321-330
Sample Test Questions
GRE Sample Questions
CAT Sample Questions
GMAT Sample Questions
TOEFL Sample Questions
ACT Sample Questions
SAT Sample Questions
LSAT Sample Questions
PSAT Sample Questions
MCAT Sample Questions
PMP Sample Questions
GED Sample Questions
ECDL Sample Questions
DMV Sample Questions
CCNA Sample Questions
MCSE Sample Questions
Network+ Sample Questions
A+ Sample Questions
Technical Sample Questions
WASL Sample Questions
CISA Sample Questions

Other Sample Questions
Sample Interview Questions
Sample Teacher Interview Questions
Sample Citizenship Questions
Accuplacer Sample Questions
Science Bowl sample Questions
Driving Test Sample Questions
Sample Survey Questions Sample Essay Questions
Sample Behavioral Interview Questions

Copyright © 2004-2013, Best BSQ. All Rights Reserved.