What r the methods present in serialization

In one of my interview i have faced this question.
I said that serialization is a marker interface, it does't contain any methods.
But the interviewing person said then How can you know the object is serialized. and also he said some write and read methods are present in serializable interface
I am confused about this.
Can any one help regarding this?
Also I want to know How can the object know whether it is serializable or remote or some thing else whn we implement the marker interface.

In one of my interview i have faced this question.
I said that serialization is a marker interface, it
does't contain any methods.You were correct.
But the interviewing person said then How can you
know the object is serialized.How can who know? The object itself can know if it implements some of the readObject/writeObject/writeReplace/readResolve methods defined in the Serialization specification (not the Serializable interface).
and also he said some write and read methods are present in serializable
interfaceIf that's exactly what he said, he was wrong: see the Javadoc for the Serializable interface. If he said they're available during serialization he is correct, see above.
I am confused about this.I think your interviewer was too.
Also I want to know How can the object know whether
it is serializable or remote or some thing else whn
we implement the marker interface.The object itself can know via self-introspection using Reflection: it can see whether it implements Serializable and/or Remote. Why it would want to do this I don't know.

Similar Messages

  • What is the disadvantages of using Serialization?

    HAi all,
    I want to store objects in a file. I am preferred to use serialization. But I want to know what are the disadvantages of using Serialization over other methods (direct file, Keyed File)?
    Can we store as many records using serialization? Is there any limit? Is there any security related issues?
    Pls help me.
    regards,
    namanc

    I don't think there is disadvantage using serialization compare to direct i/o access to file or any storage, except that you need to design your code such as it is serializable (hence, you may want to use transient keyword, or use externalizable, to be able to store/load the object properly).
    Use serialization if possible, it saves you from inventing new+uncompatible mechanism of doing something in java.

  • HT5625 if i have multiple apple IDS and i would like to delete all of them except the one I wish to continue using what is the method

    In case I have multiple Apple Ids and I want to delete all of them except one , what is the method to be followed.??
    Or is it that there is no scope for deletion and the Ids are just disabled

    Sorry, Apple ID's cannot be deleted or merged. All you can do is stop using an Apple ID.

  • What are the methods called while navigating from one applet to another one

    Hi All,
    Could any one brief me about "When you navigate from one applet to another what are the methods called ?".
    Thanks in advance.
    Best Regards,
    N.Madhusudhanan.

    http://forum.java.sun.com/thread.jsp?forum=421&thread=426771&tstart=0&trange=100

  • What are the methods available to modify standard reports?

    What are the methods available to modify standard reports?

    <b>Hi,
    I think you can copy those reports into Zreports</b>

  • What is the method used for upload of  data

    Hi All,
    What is the method used for upload of  Data from excel spread sheets to SAP HR.
    it is Bulk Data from many countries.LSMW or BDC Session Method?
    what are country specific infotypes used for PA and OM.
    can u plz give the list of country specific infotypes used for PA n OM Module.
    Thanks
    Archana

    Hi Archana,
    To Upload bulk data I think BDC is the best and effecient way.
    Regarding Infotypes we dont have any country specific Infotypes in OM & PA. In Payroll we do have according to country wise.
    I hope you had understood the point
    Regards
    Pavani
    Remainder: Points to be given on answers

  • How to get all the methods present in an interface

    hi
    i joined as a new member in sdn.
    i just want to know how to display all the methods present in an interface

    Java Reflection is the answer. Read a tutorial like this or this ...

  • What are the methods to modify SAP standard tables?

    hi
    what are the methods to modify SAP standard tables?

    .APPEND structures AND CUSTOMIZING INCLUDES.
    these are the two methods.. but customizing includes we, as a developers do not use.
    generally we use .APPEND structures to modify standard tables.
    note that we need an access key to modify atandard tables.
    we can create an apend structure and add that structure to the standard table at the end.
    note that .append structures should only be added only at the end.
    that is the reason we use .append structures to modify standard tables.as we should not include a field in the middle and disturb the original order of the standard table fields as it may effect many objects depending on the standard table.
    but Some standard tables for which there is a LONG datatype field can never be modified.
    the reason is the LONG datatype field should always be there at the end and also .APPEND strutures should always be there at the end. there will be a conflict. so, some standard tables can not be appended.

  • What is the method name?

    Hello:
    I understood that i have to override the paintComponent method.
    But my question is that, what is the method declaration by which shall i set the background image? where image name is winter.jpg
    I will be highly grateful to u if u kindly give me the proper answer.

    The answer was already given to you in your other post.
    icewalker2g gave you this site http://www.jguru.com/faq/view.jsp?EID=9691
    The code:
    import javax.swing.*;
    import java.awt.*;
    public class BackgroundSample {
      public static void main(String args[]) {
        JFrame frame = new JFrame("Background Example");
        final ImageIcon imageIcon = new ImageIcon("draft.gif"); // <--- change this image to your image
        JTextArea textArea = new JTextArea() {
          Image image = imageIcon.getImage();
          Image grayImage = GrayFilter.createDisabledImage(image);
          {setOpaque(false);}  // instance initializer
          public void paintComponent (Graphics g) {
            g.drawImage(grayImage, 0, 0, this);
            super.paintComponent(g);
        JScrollPane scrollPane = new JScrollPane(textArea);
        Container content = frame.getContentPane();
        content.add(scrollPane, BorderLayout.CENTER);
        frame.setDefaultCloseOperation(3);
        frame.setSize(250, 250);
        frame.setVisible(true);
    }In the future please read your post and don't multipost and crosspost.

  • What is the method to make a new determination of price on a PO

    Hi;
    Friends, I submits it a question to which I do not find answers in my tests.
    I created a purchase via ME21N
    I create GR via MIGO
    I entered invoice by MIRO.
    I realized that I forgot a condition of price so,
    I cancelled the invoice via MR8M
    I cancelled GR via MIGO
    in ME22N document I wanted to make a new determination of price to update the purchase order. 
    The system signal that it is impossible to make a determination of price (Message V1227). 
    Is it normal? Otherwise what is the method to make a new determination of price on a PO with GR was validated and also validated invoice?
    Thx

    Hi,
    You can use "Unplanned dely cost" option in MIRO to pay for the difference in amount than that of PO.
    Here again, you may be aware that the unplanned dely cost may be taken to inventory (or) as price difference as per the setting you have in SPRO.
    Regards,
    Siva

  • What is the method to disable the Parameters button

    Hi Ted,
    What is the method to disable the Parameters button ("Show/Hide Parameters Panel")?
    I can't find it in the API.
    Thanks,
    Tuan

    With XI 3.0, the left-hand panel is tri-state:
    [https://boc.sdn.sap.com/node/17983#setToolPanelViewType|https://boc.sdn.sap.com/node/17983#setToolPanelViewType]
    Sincerely,
    Ted Ueda

  • What is the Method to get record from DB as Date fornat??

    Halo, i want to know what is the method to get the data from database which is store it in date format.
    Previously, i am using the getDate() to get the data together with the while (rs.next() ) method after using the "select" statement to get the data from data base.
    Here is the example when i retrieve record from database:
    java.util.Date date1 = new java.util.Date();
    String getRecord = "SELECT * FROM employee "
    ResultSet rs = db. execSQL(getRecord);
    while(rs.next() ){
    String name = rs.getString("name");
    date1 = rs.getDate("date");
    }notes: method getDate() had deprecated since JDK version 1.1.
    So, i need to know what is the method to get the date record??
    Thank you.....

    Halo, ...Yeah, Halo! Love that game...
    Um, use getDate(). ResultSet.getDate() is not deprecated. If you think so, then you better go reread the API docs, cuz you're reading the wrong ones.

  • What is the method of getUserName() for JDBC DataSource in JDeveloper 11g.

    Hi All,
    I am facing a issue about getUserName() Method.
    The below method
      getDBTransaction().getConnectionMetadata().getUserName()
    working fine for JDBC URL While the  same method not working for JDBC DataSource.
    So What is optional method for getUserName() for JDBC DataSource,  I need  JDBC DataSource because in Our Standalone weblogic server we using data source.
    Maroof

    Hi Vohar,
    JNDI is there then how we can get user name you have any idea?
    Our Connection.xml look like below
                                        user                              oraJDBC                              1500                              192.168.0.0                              user1                                       thin                 

  • What are the methods used for creating customer

    i have to upload a text file and create customer using idoc .can any one suggest the methods used to fullfil this requirement

    Hi,
    Upload the file using the function module GUI_UPLOAD into an internal table then try to pass the values from the file to the segments in the idoc DEBMAS03 using the function module MASTERIDOC_CREATE_DEBMAS to create the customer.
    Any doubts regarding you can clarify.
    Thanks&Regards
    Sarves

  • What's the method name for convert integer to ASCII

    Hi, all:
    I need a method which can convert the integer value to the ASCII character. I just can't find this kind of method. If someone know the name of the method or where I need to find it, please tell me. Thanks in advance!
    he

    Its most simple to use a cast:
    int someValue;
    char someCharacter;
    someValue = 65;
    someCharacter = (char) someValue;
    System.out.println (someCharacter);
    this should display 'A' if I'm not mistaken.
    Jon

Maybe you are looking for