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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T07:39:06+00:00 2026-06-16T07:39:06+00:00

I have a small static method mymethod inside a relatively big (library) class com.package.pirulo

  • 0

I have a small static method mymethod inside a relatively big (library) class com.package.pirulo. I can do one of two things: Either I import com.package.pirulo and then I just use pirulo.mymethod(...), or I can use direclty the method with com.package.pirulo.mymethod(...).

Which is cheaper from a resources/speed point of view? It looks like the second option is cheaper , but since mymethod can call other methods in com.package.pirulo maybe the whole library is always somehow imported anyway…

And: is the first option as expensive (same POV) as instantiating a pirulo object?

  • 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-06-16T07:39:07+00:00Added an answer on June 16, 2026 at 7:39 am

    Importing makes absolutely no difference at runtime, and only a negligible (at most) difference at compile-time.

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

Sidebar

Related Questions

Have a small doubt with static method. Documentation says that Static method can't access
I have a small C# library with a static class that holds a very
I have this small class looking like this: private static int field1 = -
I have a small utility class : public static class SerializationUtilities { public static
I have a very small program: public static void main(String[] args) { Queue<String> queue
I have two small snippets for calculating SHA1. One is very fast but it
I have a small question - how can I repaint JPanel in the main
I have created static library project using the line script files. Then I am
I have an F# library project that depends on a C# class library project,
In a small ASP.NET 2.0 web-application, I have two ASHX handlers (one sync, one

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.