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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T18:07:38+00:00 2026-05-26T18:07:38+00:00

In object-oriented paradigm, a virtual function or virtual method is a function or method

  • 0

In object-oriented paradigm, a virtual function or virtual method is a function or method whose behavior can be overridden within an inheriting class by a function with the same signature to provide the polymorphic behavior.


According to the definition, every non-static method in Java is by default virtual method except final and private methods. The method which cannot be inherited for polymorphic behavior is not a virtual method.


An abstract class in Java is nothing but the pure virtual method equivalent to C++.


Why do we say that a static method in Java is not a virtual method? Even if we can override the static method and consequently it may give some advantages of the polymorphism and also a static method in Java can be invoked mostly with it’s associated class name but it is also possible to invoke it using the object of it’s associated class in Java in the same way that an instance method is invoked.

  • 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-26T18:07:39+00:00Added an answer on May 26, 2026 at 6:07 pm

    You can’t override static methods. They are bound at compile-time. They are not polymorphic. Even if you try to invoke it as if it were an instance method (which IMO you shouldn’t do) it’s bound to the compile-time type of that expression, and the execution-time value is completely ignored (even if it’s null):

    Thread otherThread = null;
    otherThread.sleep(1000); // No errors, equivalent to Thread.sleep(1000);
    

    This behaviour can be very confusing for a reader, which is why at least some IDEs allow you to generate warnings or errors for accessing static members “through” a reference. It was a flaw in Java’s design, pure and simple – but it doesn’t make static methods virtual at all.

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

Sidebar

Related Questions

As a rule in object-oriented paradigm, a static method can have access only to
I'm familiar with object-oriented architecture, including use of design patterns and class diagrams for
There's some object-oriented engineering principle that states something along the lines of a class
Which constitutes better object oriented design? Class User { id {get;set} } Class Office
Do extension methods follow the object-oriented paradigm in C#? Is it a good practice
My professor gave my class an assignment today based on object oriented programming in
In object oriented programming inheritance and virtual methods are the common scenario for creating
I think object oriented programming is overrated, however I want to learn this paradigm.
Object-oriented design (OOD) combines data and its methods. This, as far as I can
I'm new to object oriented javascript. I have a set up method that I

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.