December 20, 2008 at 5:18 AM
Hi friend,
nterface Definition
visibility mode interface interfaceName{
constant variable declarations
abstract method declarations
}
e.g.
public interface RacingCar{
public void startcar (int Obj);
public void changegear (int Obj);
public void incrrace (int Obj);
public void stopcar (int Obj);
}
Marker Interface
In java language programming, interfaces with no methods are known as marker interfaces. Marker interfaces are Serializable, Clonable, SingleThreadModel, Event listener. Marker Interfaces are implemented by the classes or their super classes in order to add some functionality.
e.g. Suppose you want to persist (save) the state of an object then you have to implement the Serializable interface otherwise the compiler will throw an error. To make more clearly understand the concept of marker interface you should go through one more example.
For more information visit to :
http://www.roseindia.net/java/master-java/interface.shtmlThanks
December 20, 2008 at 6:41 AM
Hi friend,
Tag interface
The Tag interface defines the basic protocol between a Tag handler and JSP page implementation class. It defines the life cycle and the methods to be invoked at start and end tag.
There are several methods that get invoked to set the state of a Tag handler. The Tag handler is required to keep this state so the page compiler can choose not to reinvoke some of the state setting.
marker interface
The marker interface pattern is a design pattern in computer science, used with languages that provide run-time type information about objects. It provides a means to associate metadata with a class where the language does not have explicit support for such metadata.
To use this pattern, a class implements a marker interface, and methods that interact with instances of that class test for the existence of the interface. Whereas a typical interface specifies functionality (in the form of method declarations) that an implementing class must support, a marker interface need not do so. The mere presence of such an interface indicates specific behavior on the part of the implementing class. Hybrid interfaces, which both act as markers and specify required methods, are possible but may prove confusing if improperly used.
An example of the application of marker interfaces from the Java programming language is the Serializable interface. A class implements this interface to indicate that its non-transient data members can be written to an ObjectOutputStream. The ObjectOutputStream private method writeObject() contains a series of instanceof tests to determine writeability, one of which looks for the Serializable interface. If none of these tests pass, the method throws a NotSerializableException.
Thanks.
Related Tutorials/Questions & Answers:
Advertisements
Marker interfaceMarker interface what is a
marker interface?
what is its significance
Marker InterfaceMarker Interface What is the need of
Marker Interface?When should we use
Difference between abstract class and an interfaceDifference between abstract class and an
interface
The
difference between... search for overridden methods.
There is no any
difference between a
interface...
between abstract class and
interface in java.
Abstract class is a class
Marker Interface,Java Marker Interface; and "Why use
Marker Interface?" and "
difference
between abstract... classes
Some important
difference between Interface and
abstract classes...;
In this section we will learn about
Interface and
Marker Interfaces
in Java
Marker Interface In Java to be
added special behavior.
Marker interface implemented class, like a
tag...
Marker Interface In Java
In this section we will read about
marker interface in Java.
This section will describe you the various aspects of
marker interface Marker Interface - Java Interview QuestionsMarker Interface
Hi Friends,
Marker interface means a method which has no methods. so what is d use of tat. I read "It is used... of instanceof() . wats d
difference
Thanks
problem on marker interface - Java Beginners module,this
tag or
marker interface is useful.
*. In serialization also...problem on
marker interface i want to know about
marker interface... tagged or
marker interface is used to just identify the class, in real time
Marker Interface - Java Interview QuestionsMarker Interface
Hi Deepak,
Marker interface means.... Hi friend,
Marker interface :
In java language programming... an error. To make more clearly understand the concept of
marker interface you
marker interface - Java Interview Questionsmarker interface how to create our owen
marker interface ? can u give me one example Hi Friend,
Try the following code:
interface markerImp {
}
class MarkerTest implements markerImp{
}
public class
tagged/marker interface in java - Java Beginnerstagged/
marker interface in java Hi!
what is the exact meaning and usage of of tagged or
marker interface.
Exactly where we will use it in real.... Interfaces with no methods are called
marker interfaces and they are used to
tag Difference between Mysql and SQLDifference between Mysql and SQL hello,
What is the
difference between Mysql and SQL??
hii,ADS_TO_REPLACE_1
SQL is structural quary language but mysql is database package
Difference between Timer and Thread?Difference between Timer and Thread? Can anyone tell me about the
difference between Timer and Thread, Why we need to have Timer in case we have Thread implimentation startegy in Java
Difference between SCJP ExamsDifference between SCJP Exams What is the differences
between SCJP 5 (310 - 055) exam and SCJP 6 (310 - 065) exam???
Thank You In Adv
Difference between JSP and ServletsDifference between JSP and Servlets What is the
difference between JSP and Servlets ?
JSP is used mainly for presentation only. A JSP can only be HttpServlet that means the only supported protocol in JSP is HTTP
difference between lock and synchronizationdifference between lock and synchronization Hi,
I am new in java please anyone tell me
difference between lock and synchronization in java.
its urgent.
Thank in advance
Please visit the following link:
Lock
Difference between forward and sendRedirectDifference between forward and sendRedirect What's the
difference between forward and sendRedirect?
RequestDispatcher.forward() and HttpServletResponse.sendRedirect() are the two methods available for URL redirecting
Difference between ServletContext and ServletConfigDifference between ServletContext and ServletConfig What is the
difference between ServletContext and ServletConfig?
ServletContext :Defines a set of methods that a servlet uses to communicate with its servlet
Difference between translate and replace Difference between translate and replace hiii,
What is the
difference between translate and replace?
hello,ADS_TO_REPLACE_1
Replace replace every instence of character with character sting by the given charator
Difference between GET and POST Difference between GET and POST
Difference between GET and POST ?
The
difference between a GET and a POST is the way data is transferred to a servlet. With a GET, the URL will show each name/value pair on the query
Difference between Struts and SpringDifference between Struts and Spring What are the
difference between...
tag Library while Spring does not.
5)Spring is loosely coupled while Struts... while Spring is light weight.
4)Struts supports
tag Library while Spring does
Difference between http and httpsDifference between http and https
Difference b/w HTTP and HTTPS
please provide answer in tabular form.
Hi Friend,
Differences:
1)HTTP is hyper text transfer protocol which is responsible for transmitting
Difference between error and exception ????????Difference between error and exception ? Can we handle a error in java if yes than give an code of an example?
Difference between error and exception handling.......
Exceptions are things you can create/throw