Description : The concept of multiple inheritance is implemented in Java by A) extending two or more classes B) extending one class and implementing one or more interfaces C) implementing two or more interfaces D) both B and C
Last Answer : D) both B and C
Description : What is Polymorphism? How is it implemented in Java?
Last Answer : A: It literally means the ability to take ‘more than one forms’. The ability of a method to behave in more than one form is called polymorphism. In Java, it is implemented by method (function) overloading (compile time polymorphism) and method overriding (runtime polymorphism).
Description : What is Data Abstraction? How is it implemented in Java?
Last Answer : A: Act of representing only essential features without including its background details is called Abstraction. Data Abstraction can also be defined as the process of hiding the implementation details and showing ... Java, it is implemented by the use of interfaces or by making the class abstract.
Description : What is Encapsulation? How is it implemented in Java?
Last Answer : A: Binding up of data and associated functions together into a single unit called (class) is called Encapsulation. In Java, it is implemented by the use of a class.
Description : State true or false. i) init() is called after start() in applet ii) applets are used for networking iii) inheritance is a part of Java Foundation Classes iv) final does not prevent inheritance A) i-true, ii- ... C) i-true, ii-true, iii-true, iv-true D) i-true, ii-false, iii-false, iv-false
Last Answer : B) i-false, ii-false, iii-false, iv-false
Description : If the queue is implemented with a linked list, keeping track of a front pointer and a rear pointer, which of these pointers will change during an insertion into a non-empty queue? (A) Neither of ... (B) Only front pointer changes (C) Only rear pointer changes (D) Both of the pointers changes
Last Answer : (C) Only rear pointer changes
Description : Code blocks allow many algorithms to be implemented with the following parameters : (A) clarity, elegance, performance (B) clarity, elegance, efficiency (C) elegance, performance, execution (D) execution, clarity, performance
Last Answer : (B) clarity, elegance, efficiency
Description : Consider the following statements : S1: A queue can be implemented using two stacks. S2: A stack can be implemented using two queues. Which of the following is correct ? (A) S1 is correct and S2 is not correct. ( ... S2 is correct. (C) Both S1 and S2 are correct. (D) Both S1 and S2 are not correct.
Last Answer : (C) Both S1 and S2 are correct.
Description : Consider an implementation of unsorted single linked list. Suppose it has its representation with a head and a tail pointer (i.e. pointers to the first and last nodes of the linked list). Given the ... the front node of the linked list. (D) Deletion of the last node of the linked list.
Last Answer : (D) Deletion of the last node of the linked list.
Description : Consider the following statements related to compiler construction: I. Lexical Analysis is specified by context-free grammars and implemented by pushdown automata. II. Syntax Analysis is specified by regular expressions and implemented by ... Only l (2) Only ll (3) Both I and II (4) Neither I nor Il
Last Answer : Answer: 4
Description : What is the benefit of Inheritance?
Last Answer : A: It is a very useful feature as it provides the concept of reusability. Also, it allows us to include or remove any features to an existing class without modifying it.
Description : ....................... is the key to .................. A) Serialization, persistence B) Persistence, inheritance C) Inheritance, object D) Persistence, serialization
Last Answer : A) Serialization, persistence
Description : ....................is the key to ........................ A) Serialization, persistence B) Persistence, inheritance C) Inheritance, object D) Persistence, serialization
Last Answer : C) Inheritance, object
Description : …………. Is the process of creating new classes, called derived classes from existing classes called base class. A) Inheritance B) Encapsulation C) Polymorphism D) Overloading
Last Answer : A) Inheritance
Description : ………… enable us to hide, inside the object, both the data fields and the methods that act on that data. A) Encapsulation B) Polymorphism C) Inheritance D) Overloading
Last Answer : A) Encapsulation
Description : The major goal of inheritance in C++ is A) To facilitate the conversion of data types B) To help modular programming C) To facilitate the reusability of code D) To extend the capabilities of a class
Last Answer : D) To extend the capabilities of a class
Description : .................. allows to create classes which are derived from other classes, so that they automatically include some of its "parent's" members, plus its own members. (A) Overloading (B) Inheritance (C) Polymorphism (D) Encapsulation
Last Answer : (B) Inheritance
Description : Module design is used to maximize cohesion and minimize coupling. Which of the following is the key to implement this rule? (A) Inheritance (B) Polymorphism (C) Encapsulation (D) Abstraction
Last Answer : (C) Encapsulation
Description : When the inheritance is private, the private methods in base class are.................. in the derived class (in C++). (A) inaccessible (B) accessible (C) protected (D) public
Last Answer : (A) inaccessible
Description : Consider the following two statements: (a) A publicly derived class is a subtype of its base class. (b) Inheritance provides for code reuse. Which of the following statements is correct? (A) Both the statements ( ... ) is correct and (b) is incorrect (D) Statement (a) is incorrect and (b) is correct
Last Answer : Answer: A
Description : In C++, polymorphism requires: (A) Inheritance only (B) Virtual functions only (C) References only (D) Inheritance, Virtual functions and references
Last Answer : (D) Inheritance, Virtual functions and references
Description : A ____ is a namespace for organizing classes and interfaces in a logical manner. Placing your code into ______makes large software projects easier to manage. This section explains why this is useful and ... provided by the Java Platform: a) Inheritance b) Object c) Package d) None of These
Last Answer : c) Package
Description : ______provides a powerful and natural mechanism for organizing and structuring your software. It also explains how classes inherit state and behavior from their super classes and explains how to derive one class ... the java programming language: a) Object b) Inheritance c) Class d) None of These
Last Answer : b) Inheritance
Description : Does Java support Multiple Inheritance ?
Last Answer : Ans. Interfaces does't facilitate inheritance and hence implementation of multiple interfaces doesn't make multiple inheritance. Java doesn't support multiple inheritance.
Description : What is the default java package?
Last Answer : A: java.lang
Description : Name the primitive data-types in java.
Last Answer : A: byte, short, int, long, float, double, char and boolean
Description : Mention other ways in which java handles exceptions.
Last Answer : A: Java can handle exception using the try-catch block, throws keyword and throw keyword.
Description : Why did you write java.util package? (only if you use classes like Scanner or StringTokenizer)
Last Answer : A: To include the functions of the Scanner or StringTokenizer class from the java.util package.
Description : What is significance of import java.io.* in your program?
Last Answer : A: The line imports all the classes of the java.io package into the current program.
Description : Is Java an Object Oriented language?
Last Answer : A: Yes.
Description : State true or false. i) comparisons precede logical operations in java ii) assignment operations succeed increment operations iii) arithmetic operations succeed comparisons iv) x precede + A) i-true, ii-true, iii-false, ... false, ii-true, iii-false, iv-false D) i-true, ii-false, iii-false, iv-true
Last Answer : A) i-true, ii-true, iii-false, iv-true
Description : Each method in a java class must have a unique name . A) Not necessary B) True C) False D) None of the above
Last Answer : A) Not necessary
Description : In java, string is a ............. A) primitive data type B) abstract data type C) combination of boolean D) None of the above
Last Answer : B) abstract data type
Description : Data input is A) an abstract class defined in java.io B) a class we can use to read primitive data types C) an interface that defines methods to open files. D) an interface that defines methods to read primitive data types.
Last Answer : D) an interface that defines methods to read primitive data types.
Description : Match the following. a) Java 1) is a tool for debugging java program b) Javah 2) is a tool for creating C-like header files c) Javap 3) runs java bytecode d) jdb 4) prints java code representation A) a-3, b-2,c-1 B) a-3, b-1, c-4, d-2 C) a-1, b-2, c-3, d-4 D) a-2, b-1, c-3, d-4
Last Answer : B) a-3, b-1, c-4, d-2
Description : State true or false for the following statements in Java. i) Java beans slow down software development process. ii) Java Servlets do not have built in multithreading feature. A) i-false, ii-false B) i-false, ii-true C) i-true, ii-false D) i-true, ii-true
Last Answer : A) i-false, ii-false
Description : ............... package is used by compiler itself. So it does not need to be imported for use. A) java.math B) java.awt C) java.applet D) java.lang
Last Answer : D) java.lang
Description : The class string belongs to ................... package. A) java.awt B) java.lang C) java.applet D) java.string
Last Answer : B) java.lang
Description : In a java program, package declaration .................... import statements. A) must precede B) must succeed C) may precede or succeed D) none
Last Answer : A) must precede
Description : JSP embeds in ................ in ...................... A) Servlet, HTML B) HTML, Java C) HTML, Servlet D) Java, HTML
Last Answer : D) Java, HTML
Description : State true or false for Java Program. i) Data members of an interface are by default final ii) An abstract class has implementations of all methods defined inside it. A) i-false, ii-false B) i-false, ii-true C) i-true, ii-false D) i-true, ii-true
Last Answer : C) i-true, ii-false
Description : State true or false for Java Program. i) All class variables are instance variables ii) All protected methods are friendly methods A) i-false, ii-false B) i-false, ii-true
Last Answer : B) i-false, ii-true
Description : In Java servlet method init( ) is called ..................... times. A) 1 B) 2 C) 0 D) multiple
Last Answer : A) 1
Description : In JDBC ........................ imports all Java classes concerned with database connectivity. A) javax.sql.* B) java.mysql.* C) java.sql.* D) com.*
Last Answer : C) java.sql.*
Description : The compiled java program can run on any ..................... plateform having Java Virtual Machine (JVM) installed on it. A) program B) java C) hardware D) non java
Last Answer : C) hardware
Description : In the second type the information written in java after // is ignored by the ....................... A) Interpreter B) Compiler C) Programmer D) All of the above
Last Answer : B) Compiler
Description : The third type of comment is used by a tool called .................. for automatic generation of documentation. A) Java commenting B) Java generator C) Java doc D) Java loc
Last Answer : C) Java doc
Description : System.in.read() is being used, the program must specify the .................. clause. A) throws.java.out.IOException B) throws.java.in.IOException C) throws.java.io.IOException D) throws.java.io.InException
Last Answer : C) throws.java.io.IOException