Week Three Quiz

Learning java in just 5 weeks...


Please answer the following questions to proceed to week two tutorial

Q.1 What is Polymorphism in JAVA?

a) Same method performing different actions.
b) Overriding & Overloading is part of Polymorphism.
c) An ability to inherit members of the class.
d) a & b .
Check the correct answer

Q.2 What is Method Signature in JAVA?

a) Members of the super class family.
b) Method name and method parameters.
c) Sign the patent right of method in Java.
d) Method signature consists of constructors.
Check the correct answer

Q.3 What is Method Overloading ?

a) Having two or more identical method names but different method signatures.
b) Having two or more identical method names and identical method signatures.
c) Having identical method parameter within a Sub Class.
d) None of the above.
Check the correct answer

Q.4 What is the differences between Implicit & Explicit Casting?

a) Automatic data casting done by compiler is Implicit Casting .
b) Implicit Casting is done by programmers.
c) Converting Higher data to lower data type is Explicit Casting.
d) Explicit Casting is done automatically by java compiler.
Check the correct answer

Q. 5 Differentiate between Generalization & Specialization?

a) Sub class is promoted to a super class hence it becomes general.
b) Generalization is more like widening or up-casting
c) Specialization is demoted to narrow down to sub class.
d) All of the above.
Check the correct answer

Q. 6 What does this method returns ? getClass()

a) Compares the references of two objects of a class.
b) Returns an object that contains the name of the class to which it belongs to.
c) Returns a string representation of an object to the same class
d) This method returns the hash code number of an object.
Check the correct answer

Q. 7 What is Abstract Class and Abstract Methods represent?

a) An abstract Class & an abstract method do not contain body
b) An Abstract method only contains method header not body.
c) Abstract class and abstract method is declared by 'abstract' key word before them.
d) All of the above.
Check the correct answer

Q. 8 What is an Interface?

a) An Interface contains concrete methods
b) An Interface is similar to classes and objects
c) An interface is a sort of contract and they are public and abstract by default
d) An Interface is a contract that connects across the different systems.
Check the correct answer

Q. 9 What does following java package represents?
import java.io

a) This package contains Hashtable, vector, and arrays.
b) This is an Interface of classes and objects
c) This package contains java stream
d) This package helps create Graphical User Interface GUI.
Check the correct answer

Q. 10 What is the difference between Exception and Errors?

a) An Exception can be handled but not Errors by programmer.
b) An Errors can be handled but an Exception cannot be handled
c) They both falls under Error class in java.lang package
d) All of the above.
Check the correct answer

.........................................................................

Answers of the Tutorial Three



Q.1 Correct answer is D.



Q.2 Correct answer is B.



Q.3 Correct answer is A.



Q.4 Correct answer is A & C.



Q.5 Correct answer is D.



Q.6 Correct answer is B.



Q.7 Correct answer is D.



Q.8 Correct answer is C.



Q.9 Correct answer is C.



Q.10 Correct answer is A.



No comments:

OTN Discussion Forums: Message List - Database - General

Ask Tom HOT ARTICLES

 
© Copyright 2008 - 2011. All rights reserved to dba-sansar.blogspot.com.
All other blogs, posts and entries are the property of their respective authors.
Please email us for your comments and suggessions Click Here