In Java servlet method init( ) is called ..................... times.
A) 1
B) 2
C) 0
D) multiple

1 Answer

Answer :

A) 1

Related questions

Description : State whether true or false. i) init( ) of servlet is called after a client request comes in ii) Servlets are ultimately converted into JSP 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 : JSP embeds in ................ in ...................... A) Servlet, HTML B) HTML, Java C) HTML, Servlet D) Java, HTML

Last Answer : D) Java, HTML

Description : Java Servlet i) is key component of server side java development ii) is a small pluggable extension to a server that enhances functionality iii) runs only in Windows Operating System iv) allows developers to customize any java ... & iv are true C) ii, iii & iv are true D) i, ii & iv are true

Last Answer : D) i, ii & iv are true

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 : The Servlet Response interface enables a servlet to formulate a response for a client using the method ............... (A) void log(Exception e, String s) (B) void destroy() (C) int getServerPort() (D) void setContextType(String Type)

Last Answer : (D) void setContextType(String Type)

Description : Which method will a web browser call on a new applet? A) main method B) destroy method C) execute method D) init method

Last Answer : D) init method

Description : Which statement is not true about process 0 in the Unix operating system? (A) Process 0 is called init process. (B) Process 0 is not created by fork system call. (C) After forking process 1, process 0 becomes swapper process. (D) Process 0 is a special process created when system boots.

Last Answer : (A) Process 0 is called init process.

Description : In Unix, the login prompt can be changed by changing the contents of the file ............... (A) contrab (B) init (C) gettydefs (D) inittab

Last Answer : Answer: C

Description : Which statement is not correct about “init” process in Unix? (1) It is generally the parent of the login shell. (2) It has PID 1. (3) It is the first process in the system. (4) Init forks and execs a ‘getty’ process at every port connected to a terminal.

Last Answer : It is the first process in the system.

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 : 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 : State true or false. i) Unix, support multiple user process but only support one thread per process. ii) A java run time environment is an example of a system of one process with multiple threads. A) True, False B) True, True C) False, True D) False, False

Last Answer : B) True, 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, when we implement an interface method, it must be declared as: (A) Private (B) Protected (C) Public (D) Friend

Last Answer : (C) Public

Description : The number of function points of a proposed system is calculated as 500. Suppose that the system is planned to be developed in Java and the LOC/FP ratio of Java is 50. Estimate the effort (E) required to ... ) 25 person months (B) 75 person months (C) 62.5 person months (D) 72.5 person months

Last Answer : (C) 62.5 person months 

Description : A software company needs to develop a project that is estimated as 1000 function points and is planning to use JAVA as the programming language whose approximate lines of code per function point is accepted as 50. Considering a=1. ... ? (1) 11.2 months (2) 12.2 months (3) 13.2 months (4) 10.2 months

Last Answer : Generally, any projects are measured in weeks. However, the complex project might take more time depending on the level of object re-use available.

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 : In Java variables, if first increment of the variable takes place and then the assignment occurs. This operation is also called ............................. . A) pre increment B) post increment C) incrementation D) pre incrementation

Last Answer : A) pre increment

Description : What is servlet Chaining ?

Last Answer : Ans. Multiple servlets serving the request in chain.

Description : Filters were officially introduced in the Servlet ……………… specification. A) 2.1 B) 2.3 C) 2.2 D) 2.4

Last Answer : B) 2.3

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 : What is Inheritance? How is it implemented in Java?

Last Answer : A: The ability of a class to adopt/share the properties (data and functions) completely or partially from another class is called Inheritance. In Java, it is implemented by the use of the keyword, extends.

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 : 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 : 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 : 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 : 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 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 : 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

Description : In java, ............. can only test for equality, where as ............ can evaluate any type of the Boolean expression. A) switch, if B) if, switch C) if, break D) continue, if

Last Answer : A) switch, if

Description : In order to run JSP .................... is required. A) Mail Server B) Applet viewer C) Java Web Server D) Database connection

Last Answer : C) Java Web Server

Description : The jdb is used to A) Create a jar archive B) Debug a java program C) Create C header file D) Generate java documentation

Last Answer : B) Debug a java program

Description : All java classes are derived from A) java.lang.Class B) java.util.Name C) java.lang.Object D) java.awt.Window

Last Answer : D) java.awt.Window