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. Is "abc" a primitive value?

    Answer: The String literal "abc" is not a primitive value. It is a String object.

  2. What restrictions are placed on the values of each case of a switch statement?

    Answer: During compilation, the values of each case of a switch statement must evaluate to a value that can be promoted to an int value.

  3. What modifiers may be used with an interface declaration?

    Answer: An interface may be declared as public or abstract.

  4. Is a class a subclass of itself?

    Answer: A class is a subclass of itself.

  5. What is the difference between a while statement and a do statement?

    Answer: A while statement checks at the beginning of a loop to see whether the next loop iteration should occur. A do statement checks at the end of a loop to see whether the next iteration of a loop should occur. The do statement will always execute the body of a loop at least once.

  6. What modifiers can be used with a local inner class?

    Answer: A local inner class may be final or abstract.

  7. What is the purpose of the File class?

    Answer: The File class is used to create objects that provide access to the files and directories of a local file system.

  8. Can an exception be rethrown?

    Answer: Yes, an exception can be rethrown.

  9. When does the compiler supply a default constructor for a class?

    Answer: The compiler supplies a default constructor for a class if no other constructors are provided.

  10. If a method is declared as protected, where may the method be accessed?

    Answer: Classes or interfaces of the same package or may only access a protected method by subclasses of the class in which it is declared.

« 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.