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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T13:16:06+00:00 2026-06-06T13:16:06+00:00

In UML, if there’s a class A having an object of type B as

  • 0

In UML, if there’s a class A having an object of type B as member, then A depends on B.
But I haven’t understood if the dependency is valid even if A doesn’t have any field of type B, but it uses an object of type B in it’s method, for example:

public class A
{
    A()
    {}
    public void print()
    {
        B b=new B();
        System.out.println(b);
    }
}

This case, would it means that A depends on B?

  • 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-06T13:16:07+00:00Added an answer on June 6, 2026 at 1:16 pm

    This all depends on what “depends” means.

    In terms of Java, A depends on B when the code for A will not compile or run without B being present.

    In terms of UML, “depends” is not a term that is used. If you for example have an arrow from class A to class B in a UML diagram, that means that A somehow knows about B. How that is implemented in the programming language of your choice depends.

    Warning: Highly opinionated statement follows!

    Avoid UML like the plague. Take it from someone who’s worked with it for a long time.

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

Sidebar

Related Questions

There are many methods for representing structure of a program (like UML class diagrams
I was wondering if there was a software that would generate UML class diagrams
Are there any good tools to generate UML class diagrams using the source code
Is there any eclipse plugin that can generate UML/Class Diagram from C++ source code?
Is there an option in VS2010 Ultimate in UML tools to create class diagram
Is there any tool to generate a class hierarchy graph (like UML) for ActionScript3
Are there any free tools to automatically create UML diagrams from an existing .Net/Visual
Are there any reference cards or cheats sheets available for UML?
Is there a way to get a reference to Microsoft.VisualStudio.Uml.Profiles.IStereotype interface in a t4
Making UML sequence diagram in VS 2010RC I've observed that there is no activation

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.