Cracking the Java Coding Interview pdfdrive com


First the servlet is constructed, then initialized wih the init() method


Download 1.48 Mb.
Pdf ko'rish
bet57/182
Sana02.05.2023
Hajmi1.48 Mb.
#1423275
1   ...   53   54   55   56   57   58   59   60   ...   182
Bog'liq
Cracking the Java Coding Interview ( PDFDrive )

First the servlet is constructed, then initialized wih the init() method.
Any request from client are handled initially by the service() method before
delegating to the doXxx() methods in the case of HttpServlet.
The servlet is removed from service, destroyed with the destroy() methid,
then garbaged collected and finalized.
What is an Iterator interface?
The Iterator interface is used to step through the elements of a Collection .
Describe the Garbage Collection process in Java ?
The JVM spec mandates automatic garbage collection outside of the
programmers control. The System.gc() or Runtime.gc() is merely a
suggestion to the JVM to run the GC process but is NOT guaranteed.
How many static init can you have ?
As many as you want, but the static initializers and class variable initializers
are executed in textual order and may not refer to class variables declared
in the class whose declarations appear textually after the use, even though
these class variables are in scope.
What is constructor chaining and how is it achieved in Java ?
A child object constructor always first needs to construct its parent (which
in turn calls its parent constructor.). In Java it is done via an implicit call to
the no-args constructor as the first statement.
What methods can be overridden in Java?
In C++ terminology, all public methods in Java are virtual. Therefore, all
Java methods can be overwritten in subclasses except those that are


Java methods can be overwritten in subclasses except those that are
declared final, static, and private.
Describe java’s security model.
Java’s security model is one of the most interesting and unique aspects of

Download 1.48 Mb.

Do'stlaringiz bilan baham:
1   ...   53   54   55   56   57   58   59   60   ...   182




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©fayllar.org 2024
ma'muriyatiga murojaat qiling