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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T13:27:14+00:00 2026-05-31T13:27:14+00:00

Data is passed to a function explicitly whereas a method is implicitly passed to

  • 0

Data is passed to a function “explicitly” whereas a method is “implicitly passed” to the object for which it was called.

Please could you explain the difference between these two ways of passing data? An example in java or c# would help.

  • 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-31T13:27:15+00:00Added an answer on May 31, 2026 at 1:27 pm

    The language Java and Python are good examples in illustrating this. In Python, the object is passed explicitly whenever a method of a class is defined:

    class Example(object):
    
        def method(self, a, b):
            print a, b
            # The variable self can be used to access the current object
    

    Here, the object self is passed explicitly as the first argument. This means that

    e = Example()
    e.method(3, 4)
    

    is effectively the same as calling method(e, 3, 4) if method were a function.

    However, in Java the first argument is not explicitly mentioned:

    public class Example {
        public void method(int a, int b) {
            System.out.println(a + "  " + b);
            // The variable this can be used to access the current object
        } 
    }
    

    In Java, it would be:

    Example e = Example();
    e.method(3, 4);
    

    The instance e is passed to method as well but the special variable this can be used to access it.

    Of course, for functions each argument is passed explicitly because each argument is mentioned in both the function definition and where the function is called. If we define

    def func(a, b, c):
        print a, b, c
    

    then we can call it with func(1, 2, 3) which means all arguments are explicitly passed.

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

Sidebar

Related Questions

Can someone please explain to me how the data passed to jquery object, so
What data types can be passed between c++ and java/java to c++? Also, are
I have a universal data type, which is passed by value, but does not
What is the best way of supporting optional data passed to a C# function?
... // result is a JSON data passed to this function from outside var
Does jQuery have a method to determine if an argument passed to function is
Problem: I have a function that gets passed data and a size. But I
I have some data passed into the flex via webservices, and want to create
I'm looking into a mechanism for serialize data to be passed over a socket
I'm working on an asp.net-mvc application. The linq data context is being passed into

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.