Coddicted - Page 30 of 35 - Codes.Notes.Tutorials.

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     space ! ! exclamation mark “ " quotation mark # # number sign $ $ dollar sign % % percent sign & & ampersand ‘ ' apostrophe ( ( left parenthesis ) ) right parenthesis * * asterisk + + plus sign , , ...

Hashmap and Hashtable

The HashMap class is roughly equivalent to Hashtable, except that it is non synchronized and permits nulls. (HashMap allows null values as key and value whereas Hashtable doesn’t allow nulls). However, HashMap can be synchronized using Map m = Collections.synchronizeMap(hashMap); Hashtable and HashMap are member of the Java Collections Framework (since Java 2 platform v1.2, ...

Frameworks

A Framework is a set of reusable classes that forms the foundation of the java application. It is a layered structure that indicates how the components of the application should be developed and how they are interrelated. Framework helps the programmers to build application quickly. Some Java frameworks 1. Hibernate 2. Spring 3. Struts 4. ...

Bizzare Eclipse Problem

Bizzare Eclipse Problem
Here we explain a very bizarre yet interesting issue that occurs in Eclipse IDE. Problem Description : Sometime(s) while writing a new method, specifically, while writing its signature, Eclipse IDE keeps on selecting the method name typed so far. The situation is depicted in the following two screens : In the first screen I begin ...

forward and sendRedirect

Whenever there is a request from the client (or browser) to the server, the server container creates two objects 1. request 2. response and pass these objects to the servlet along with other parameters if needed.    S.No.  RequestDispatcher.forward  HttpServletResponse.sendRedirect  1. the request is forwarded to other resource(say B) in the same context, B does some ...

flushing buffer means?

Flushing means the data processed so far can go to the client even if the rest of the page isn’t done yet. It’s useful when you have a lot of data to send like in a download. flush=true : means send to client flush=false : means wait. Back To Top

Error and Exceptions

Error and Exceptions
An Error is a subclass of Throwable that indicates serious problems that a reasonable application should not try to catch. Most such errors are abnormal conditions. An Error is represented by an object of class Error. But an error is too severe for a program to handle mostly abnormal conditions, the program must stop running. Example : ...