Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 573531
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T13:44:02+00:00 2026-05-13T13:44:02+00:00

I have gone through the following tutorial : http://www.javaworld.com/community/node/2915 And after reading the above

  • 0

I have gone through the following tutorial :

http://www.javaworld.com/community/node/2915

And after reading the above article, I feel, that it is not possible to
write a Marker interface, because, how can you instruct compiler, that, what tag,
it embed in the .class file for your Marker interface.

Please correct me, if I am wrong.
cheers 🙂

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T13:44:03+00:00Added an answer on May 13, 2026 at 1:44 pm

    here tag is hexa decimal code AC ED, which is added to the .class file of that class which implements Serializable interface. So, that JVM treats this class file in a special way (may be some heavy resource allocation work), because instance of this class might be serialized. For normal classes, it adds CA FE hex.

    Aha!! I understand your confusion.

    • CA FE the magic number for a bytecode file; i.e. the file you get when you compile a class. The bytecode file for ANY class has this magic number, whether it is serializable or not serializable.

    • AC ED is the magic number a serialized Java object file; i.e. the file you serialize an instance of some serializable class.

    You are mixing up two different concepts (classes and instances) and their respective representations.

    So the answer to your question is … of course you can write your own marker interfaces! There is nothing special to the compiler about a class that implements a marker interface.

    However, it would be impossible to duplicate the implementation of Java object deserialization in pure Java. Object deserialization uses a backdoor (the Unsafe.allocateInstance method) to create objects without invoking their constructors. AFAIK, this method cannot be called from normal Java code. (And even if it can, it shouldn’t be …)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have gone through this page... http://www.php.net/manual/en/function.hash.php MD5 is 32 characters long while sha1
I have gone through the previous thread on the same topic After reading that
I have gone through following question. Convert NSString to NSDictionary It is something different
I have downloaded sample code from Apple Center.I also have gone through following question:
What could be the understanding of the following? I have gone through this post
I have gone through the fadein/fadeout tutorial that is on this page: For the
I have been reading through what seems to be a good tutorial on rest
I have gone through following links enter link description here enter link description here
I have gone through the following question. Objective C - Where do you dealloc
I have gone through this question that shows the following code: -(NSString *)tableView:(UITableView *)tableView

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.