Tuesday, 2 May 2017

Todays java Quiz-1

This quiz comprises of very basic to intermediate level of java concept questions. See how much you score out of 10. 

Note : Answers to each question is given at the end.

1. These variables cannot be serialized
  1. final
  2. static
  3. strictfp
  4. transient

2. Which of the following pair are java Object class method?
  1. run &finalize
  2. equals & hashcode
  3. getclass & getobject
  4. notify & sleep

3. Use of it can prevent a parent class method from being overriden in subclass
  1. finally
  2. finalize
  3. final
  4. static

4. Is it possible to create abstract class without any abstract method?
  1. Yes
  2. No

5. If there is return statement at the end of try block will finally still execute?
  1. Yes
  2. No

6. Set is a/an
  1. Class
  2. Abstract class
  3. Interface
  4. Wrapper Class

7. Comparable interface provides 
  1. Multiple sorting sequence
  2. Single sorting sequence
  3. None

8. To find .(dot) class files we need to set 
  1. path
  2. classpath
  3. none

9. Iterator is a/an ________________


10. Which of the following is synchronized?
  1. string builder
  2. string buffer
  3. Array list
  4. Linked list


Answers

1-4(transient)    2-2(equals & hashcode)   3-3(final)    4-1(Yes)     5-1(Yes)    6-3(Interface)

7-2(Single sorting sequence)   8-2(Classpath)      9-interface        10.2(string buffer)


Previous Java Quiz

No comments:

Post a Comment

-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
If you are looking for a reference book on java then we recommend you to go for → Java The Complete Reference
Click on the image link below to get it now.