Marker Interfaces

Marker interfaces are those which do not declare any required methods, but signify their compatibility with certain operations. The java.io.Serializable interface and Cloneable are typical marker interfaces. These do not contain any methods, but classes must implement this interface in order to be serialized and de-serialized.

Linux – Time Command

Linux - Time Command
Time command is used to determine the duration of execution of particular “command”. When the “command” completes , the time command writes the statistics ( the real elapsed time, the user CPU time and the sys CPU time) to the command line just after the output of the “command”.  

JVM, JRE, JDK 2

JVM (Java Virtual Machine) is an abstract machine.It is a specification that  provides runtime environment in which java bytecode can be executed. JVMs are available for many hardware and software platforms (i.e. JVM is plateform dependent).   The JVM performs four main tasks: Loads code Verifies code Executes code Provides runtime environment   JRE is an acronym for ...

JSP include standard action and include directive

S.No.  include directive  JSP include <jsp:include page="..." ></jsp:include>..........  1. Content of the file specified in the attribute “file” of the include directive will be pasted as it is at tranlation time , where include directive is used in the jsp  At runtime, the includED file will be executed and the response will be included in the includING ...

Jsp Implicit Objects and EL implicit Variables

Jsp Implicit Objects  EL Implicit Variables  1. JspWriter out 2. HttpServletRequest request 3. HttpServletResponse response 4. HttpSession session 5. ServletContext application 6. Servlet config 7. Throwable exception 8. PageContext pageContext 9. Object page 1. cookie 2. pageContext 3. header 4. headerValues 5. param 6. paramValues 7. initParam 8. applicationScope 9. requestScope 10. sessionScope 11. pageScope

Invalid Statements

1. Using the method isUserInRole(), overrides any declarative authorization related to method in which it is invoked – isUserInRole() method itself doesn’t do any authorization. 2. name - value attribute is mandatory for  3. Benefits of the JSP precompilation is , it avoids initialization on the first request. 4.             java.lang.Error             /error.html           - valid value ...

Interface and Abstract Class

An Interface declaration introduces a new reference type whose members are classes, interfaces, constants and abstract methods. This type has no implementation, but otherwise unrelated classes can implement it by providing implementations for its abstract methods. An Abstract Class is a class which contain one or more abstract methods, which has to be implemented by sub ...

Init method and Constructor in Servlet 3

Servlet is a Java class-a special java class and it does have a no-argument constructor. When the container loads the servlet into the memory, the no-argument constructor is called.(Till now the servlet object is not a servlet but a normal POJO – plain old java object). It becomes a servlet when it is given the ...

Immutable Objects

Immutable means unchangeable.In Java,when you have a reference to an instance of an object, the contents of that instance cannot be altered, that is objects that you cannot change the contents after they have been set. All of the java.lang package wrapper classes are immutable: Boolean, Byte, Character, Double, Float, Integer, Long, Short, String. How ...

HTML ASCII Reference

ASCII Printable Characters ASCII Character HTML Entity Code Description   &#32; space ! &#33; exclamation mark “ &#34; quotation mark # &#35; number sign $ &#36; dollar sign % &#37; percent sign & &#38; ampersand ‘ &#39; apostrophe ( &#40; left parenthesis ) &#41; right parenthesis * &#42; asterisk + &#43; plus sign , &#44; ...