What is Markable Interface in JAVA

What is Markable Interface in JAVA need explanation

Markable interface in one which does not contain any
method or member declaration.
Eg: Serializable, Observable etc...terminology aside, I don't think "not containing any methods" is enough to call something a marker interface. is EventListener a marker interface? I don't think so, I think of it as a supertype for all other event listeners in the JDK

Similar Messages

  • What is the diffrence between My Runnable Interface and Java Runnable

    Hi folks
    all we know that interfaces in java just a decleration for methods and variables.
    so my Question is why when i create an interface its name is "Runnable" and i declared a method called "run" inside it.then when i implements this interface with any class don't do the thread operation but when i implement the java.lang.Runnable the thread is going fine.
    so what is the diffrence between My Runnable Interface and Java Runnable?
    thnx

    Hi folks
    all we know that interfaces in java just a decleration
    for methods and variables.
    so my Question is why when i create an interface its
    name is "Runnable" and i declared a method called
    "run" inside it.then when i implements this interface
    with any class don't do the thread operation but when
    i implement the java.lang.Runnable the thread is going
    fine.
    so what is the diffrence between My Runnable Interface
    and Java Runnable?
    thnxClasses and interfaces are not identified by just their "name", like Runnable. The actual "name" the compiler uses is java.lang.Runnable. So even if you duplicate the Runnable interface in your own package, it's not the same as far as the compiler is concerned, because it's in a different package.
    Try importing both java.util.* and java.awt.* (which both have a class or interface named List), and then try to compile List myList = new ArrayList();

  • Interfaces in Java

    I have a doubt about interfaces. All interface in Java has empty methods, I mean,the methods dont have any implementation. So, to use these methods, there has to be a class that implements this interface in order these methods to have an implementation. Here is my question: there are some Interfaces in Java like java.sql.Statement that dont have any class that implements its methods and in spite of this, I can call the methods of the interface. How is this possible?
    Thanks

    Yes there is always an implementation. You just aren't necessarily exposed to the actual class which implements the interface, but you can tell what the class is like this:
    Statement stmt = ...; // get your Statement however you are doing it now
    System.out.println("Actual class implementing Statement interface in this case is: " + stmt.getClass());

  • Hi,all i think it seems to be silly question about markable interface

    i know that markable interface doesnt consists any methods.But when we implements those interfaces how they behave to service the class.
    ex.
    public class MyClass implements java.io.Serializable
    MyClass is serializable but the java.io.Serializable doesnt consist any methods how it service to MyClass

    you implement the Serializable interface just to let the API/JVM to know that the instances of the class can be serialized.
    These kind of interfaces are called marker interfaces.
    By the way some time ago there was a good discussion on marker interfaces on this forums. Try searching you might find it.

  • Templates in c++ vs interface in java

    What is the advantage of using interface in java than use of templates in C++

    They are not comparable. In any case, the language you chose will determine which one you can use, so this is not a choice.
    When comparing templates, the closest in java is generics. If this is what you meant, I suggest you look at some of these
    [http://www.google.co.uk/search?q=templates+vs+generics] 1,440,000 hits covers this topic fairly well.

  • What is marker Interface

    hi
    what is marker interface
    what is the use of it
    plz give me reply
    bye

    Marker interface is an interface without any method.
    Eg : Serializable
    refer this link
    http://forum.java.sun.com/thread.jspa?threadID=597388&messageID=3787740

  • Difference between interfaces in Java API and user defined interfaces

    Is there any differences between the interfaces (such as KeyListener, ActionListener and EventListener etc.,) in Java API and the user defined interfaces.
    The user defined interfaces seems to be empty without any functionality (except its constant and method declarations). But the interfaces in Java API seems to have some functionality behind them, since they route the device events to the programs.
    Actually what is happening behind the Java API's interfaces?
    Please clarify.

    Ummm, no they are not (or at least some of them are not). Also, some things we support now we may not have supported in a previous release.
    If you look at the section 2 (Working with TimesTen Data Stores0 in the TimesTen Java Developer's Guide and look at the sections:
    TimesTen JDBC Extensions
    Additional TimesTen classes and interfaces
    then you will see the extra functionality documented there. Of course, if you do not need any of this functionality then you can simply treat them as the base classes from java.sql and they will work fine so it is easy to make most of your code generic.
    Chris

  • What are Crypto Cards, and what are they different from Java Cards?

    Hi,
    I just heard the name 'Crypto Card'. I thought Java Card is the only standard for smart card. Could anyone tell me what are Crypto Cards, and what are they different from Java Cards? Thanks in advance.
    Joey

    Probably any card that offers cryptographic capabilities (crypto coprocessor) could be called "Crypo Card", but likely the term was referred to cards offering a pkcs#11 interface.
    Pkcs#11 is the standard for accessing crypto devices, like tokens, cards, or accelerators. Such a device can be easily accessed for example from your browser to perform cryptographic and digital signature operations.
    A Javacard can operate as a pkcs#11 device in you install on it an applet dealing with the pkcs#11 requests.

  • How to find out what are the interfaces used for Job and Job Codes

    HI All,
    I just wanted to know how do we find out what are the interfaces used for Job and Job codes .
    Thanks In Advance
    Sunny

    Hi,
    Here is an idea for your request.
    Basically you can create a simple query on multiprovider 0TCT_MC01.
    Filter: you can use a variable for restriction of time ( calday, or calmonth) since you should be interested for a time period.
    Choose following characters into your objects:
    InfoProvider ( 0TCTIFPROV )  - you can create a variable for choosing infoprovider before query runs.
    *Tp.[Type of BI Application Object] 0TCTBISOTYP  = filter this with 'QUERY' or whatever your need is.
    *BI Application Object 0TCTBISBOBJ,  ( this will give you the name of the queries)
    In key figures choose,  Count for BI Appl. (0TCTWTCOUNT).
    (number for query run)
    Create a condition , for top 20.
    Hope this helps.
    Derya

  • Need Info Regarding Implementaion of Interfaces in java.sql package

    Hi All,
    I am interested in knowing details abt how the Interfaces in the java.sql package are implemented. We all work with the database using the interfaces provided ,but how do they work at the backend ? How can a Interface provide details (work ) with out an implementation class.I Is this taken care by the JVM or some of the Call level interfaces? Please do provide details abt this..

    hi Sheshadri,
    The implementation of the various interfaces in
    java.sql package are provided by your jdbc driver,
    which also manages the connection and communication of
    your java program with the appropriate database.
    cheers,
    -Jer

  • What are the Interfaces in ABAP

    Hi all,
    What are the Interfaces in ABAP ?
    send me any material on the same

    Dear
    Interface are basically used to upload large amt of data in SAP .
    Intrfaces are Automation of BDCS..
    Search for BDC'S IN FORUM u will get lots of material on same
    Rgds
    Santo

  • What's the difference between Java SDK and the Enterprise Edition?

    What's the difference between Java SDK and the Enterprise Edition? Are they both free?

    both r free but they are used in diffrent applications. sdk are used for simple apps that run on your computer while j2e (enterprise edition) are ment for large distributed computer systems that include servers and such. if you don't know the diffrence you probably wont need the the j2e, only the sdk.

  • Do I need Java 8 or should i disable it? What happens if i disable it? And what is the difference between Java and Java Runtime?

    Do I need Java 8 or should I disable it? What happens if i disable it? And what is the difference between Java and Java Runtime?

    There's no difference. They're both runtime plug-ins (they run when an app calls for Java functions).
    You only need Java if you either have Java apps on your Mac that won't run without having it installed, or you use trusted web sites that require Java to function (getting fewer and far between). Otherwise, you have no need for it at all.

  • What   the   Enviroment  required  for java databases programs?

    Hi guys
    What the enviroment required for java databases programs?
    If I have oracle of version 9i and java 1.4.1 platform
    do I need Jdeveloper platform ?

    What the enviroment required for java databases programs?What do you mean by "environment"?
    f I have oracle of version 9i and java 1.4.1 platformYou just need to download Oracle's 9i JDBC driver (ojdbc14.jar) and put that in your CLASSPATH. Then write JDBC code to connect to Oracle and issue SQL commands.
    do I need Jdeveloper platform ?No, JDeveloper is an IDE. Not required.
    Why Java 1.4.1? We're up to Java 6 now. You're two major versions of the JDK behind.
    %

  • What is wrong in this java code?

    Can someone please tell me what is wrong in this java code?
    /* The program is intended to start animating text at the click of a button, pause it at another click and resume at the next click. It should continue like this */
    import javax.swing.*;
    import java.util.*;
    import java.awt.*;
    import java.awt.event.*;
    public class TextAnime implements Runnable
    JFrame frame;
    boolean flag;
    Thread animeThread;
    JLabel label;
    String[] textArray;
    public TextAnime()
    flag = false;
    animeThread = new Thread(this);
    frame = new JFrame("Animate Text");
    GridBagLayout gbl = new GridBagLayout();
    GridBagConstraints gbc = new GridBagConstraints();
    frame.setLayout(gbl);
    JButton button = new JButton("Start");
    label = new JLabel("Stopped");
    textArray = new String[5];
    String textArray1[] = {"Programmer", "SportsMan", "Genius", "Friend", "Knowledgable"};
    for(int ctr = 0; ctr<5 ; ctr++)
    textArray[ctr] = textArray1[ctr];
    gbc.weightx = 1;
    gbc.gridx = 0;
    gbl.setConstraints(button,gbc);
    frame.getContentPane().add(button);
    ButList bl = new ButList();
    button.addActionListener(bl);
    gbc.gridx = 1;
    gbl.setConstraints(label,gbc);
    frame.getContentPane().add(label);
    frame.setSize(200,150);
    frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOS E);
    frame.setVisible(true);
    public class ButList implements ActionListener
    public void actionPerformed(ActionEvent evt)
    if(flag == false)
    flag = true;
    animeStart();
    else
    flag = false;
    //animeStop();
    public synchronized void animeStart()
    animeThread.start();
    Thread newThread;
    newThread = Thread.currentThread();
    newThread.notify();
    public void animeStop()
    animeThread.interrupt();
    public void run()
    int i = 0;
    try
    while(i == i)
    if(i==5)
    i=0;
    label.setText(textArray);
    animeThread.sleep(1000);
    i++;
    if (flag == false)
    animeThread.wait();
    catch(InterruptedException ie)
    label.setText("Stopped");
    public static void main(String args[])
    TextAnime ta = new TextAnime();
    Please tell me if this can be written in a more simpler manner. Also please correct this code. I am tired after trying many times.

    When I fix your error, compile and run it, I get this exception:
    Exception in thread "AWT-EventQueue-0" java.lang.IllegalMonitorStateException
         at java.lang.Object.notify(Native Method)
         at cruft.TextAnime.animeStart(TextAnime.java:81)
         at cruft.TextAnime$ButList.actionPerformed(TextAnime.java:63)
         at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995)
         at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2318)
         at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387)
         at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242)
         at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:236)
         at java.awt.Component.processMouseEvent(Component.java:6038)
         at javax.swing.JComponent.processMouseEvent(JComponent.java:3260)
         at java.awt.Component.processEvent(Component.java:5803)
         at java.awt.Container.processEvent(Container.java:2058)
         at java.awt.Component.dispatchEventImpl(Component.java:4410)
         at java.awt.Container.dispatchEventImpl(Container.java:2116)
         at java.awt.Component.dispatchEvent(Component.java:4240)
         at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4322)
         at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3986)
         at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3916)
         at java.awt.Container.dispatchEventImpl(Container.java:2102)
         at java.awt.Window.dispatchEventImpl(Window.java:2429)
         at java.awt.Component.dispatchEvent(Component.java:4240)
         at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)
         at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:273)
         at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:183)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:173)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:168)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:160)
         at java.awt.EventDispatchThread.run(EventDispatchThread.java:121)
    %

Maybe you are looking for

  • Grid with BOLinkedObject will NOT open Invoices from 2nd Doc Sequence

    I have a simple form with a grid. It displays either invoices/deliveries/orders which are open. One of the columns is a LinkedObject to open the document. The system has multiple document number sequences assign to different users based on the store

  • Getting error as Buffer table not up to date

    Hi SRM gurus, We have one order which is created in the EBP side and the same is replicated in the backend also. Also confirmations and invoices are posted for this local PO. These confirmations and invoices are also carried over to backend. However

  • Packet queue strategy & data structure

    Hi all, does anyone know an efficient data structure to implement a global packet queue in which packets from different connection are queued (by a thread) and removed by another thread ? The basic idea is to have the following 2 threads (in pseudo c

  • Error loading project

    What the heck! I was able to open this project file not to long ago and now it is giving me a message saying "Error loading project: Invalid project file format". This seems like such a simple error, but it is still baffling me and I can't open the p

  • Aperture 3 Export Watermarks Broken?

    I've upgraded to Aperture 3 and I have re-added the watermarks that I used to use under Aperture 2 to the export presets. The watermarks that I have built are sized to fit into the lower right corner (i.e., 128 x 128 for a 2048 x 2048 export). When u