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

  • Home
  • SEARCH
  • 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
  • 1 View
  • 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

What is meant by object serialization? Can you please explain it with some examples?
I want to know what a virtual base class is and what it means.
Boost is meant to be the standard non-standard C++ library that every C++ user
What is meant by ‘value semantics’, and what is meant by ‘implicit pointer semantics’?
What is meant by nvarchar ? What is the difference between char , nchar
What is meant by Constant Amortized Time when talking about time complexity of an
What is meant by using an explicit memory fence?
I'm writing a number of articles meant to teach beginning programming concepts through the
I have a .NET application that is meant to be run on a local
The code I have pasted below is meant to display images on the middle

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.