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 671027
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T00:19:43+00:00 2026-05-14T00:19:43+00:00

What is meant by virtual table resolution strategy used by JVM ? Can somebody

  • 0

What is meant by virtual table resolution strategy used by JVM ?
Can somebody explain in detail ?

  • 1 1 Answer
  • 3 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-14T00:19:43+00:00Added an answer on May 14, 2026 at 12:19 am

    Basically any method that is not declared final can be overriden in any inheriting class. A virtual table resolution strategy is how Java dynamically dispatches method invocations to the method definition of the runtime type of the object. For example, if you have an object s that is declared to be of type Shape but was instantiated as new Circle() (i.e. Shape s = new Circle()) and then you invoke s.draw()… if Circle overrides draw, you want the Circle’s version of the draw method to be invoked and not the Shape’s version of that method. This information can only be figured out at runtime (if you are passed a Shape object, it could be passed in from a JAR that the compiler never sees, so the compiler has no way of figuring out what specific subclass of Shape was instantiated), and so it is up to the VM to dispatch the method invocation to the correct method definition (in this case, the version of draw provided by Circle).

    // Shape.java
    public class Shape
    {
         public void draw(){
            System.out.println("I'm a Shape");
         }
    }
    
    
    // Circle.java
    public class Circle extends Shape
    {
         public void draw(){ 
              System.out.println("I'm a Circle");
         }
    }
    
    // Elsewhere
    Shape s = new Circle();
    s.draw(); // should print "I'm a Circle"
    

    With most implementations of a virtual table, each class has a table where each entry is a member function and its corresponding address. So, the virtual table for Circle and Shape would both have an entry in the table for “draw”, but the virtual table for Circle and Shape each have the entry for draw point to their respective definitions of that function. Then, each instance of the class points to the virtual table of its given class. So, when you do new Circle(), it contains an entry pointing to the virtual table of Circle. When a method that is not declared final is invoked, the appropriate method implementations is invoked by looking up the appropriate offset into the object’s virtual table.

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

Sidebar

Related Questions

I mean I can't type from my laptop keyboard into android emulator anymore. Virtual
What is meant by running the program in warm cache? Can someone be kind
I am confused over what is meant by virtual address space. In a 32
During testing of our implementation of SQLite Virtual Table mechanism we've encountered an unexpected
Short Description The question is not meant to ask if using virtual environments are
I have the following existing classes: class Gaussian { public: virtual Vector get_mean() =
[i meant to ask this question on StackOverflow...] I have been using VisualSVN Server
What is meant by this ? for (RosterEntry r : entries) here entries is
What is meant by point in sandboxed solutions resource quota. 1point equals to what?
What is meant by Ems (related to a TextView)? For example in android:ems setEms(int)

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.