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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T21:10:17+00:00 2026-06-11T21:10:17+00:00

What is UML sequence diagram of the following code featuring a class with two

  • 0

What is UML sequence diagram of the following code featuring a class with two inner classes where each one is instantiated once as seen in the main function?

class A{

 class B{
  C f(){}
 }
 class C{}

 static void main(){
  A a = new A()
  B b = new B();
  C c = new C();
  c = b.f();
 }

}
  • 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-11T21:10:18+00:00Added an answer on June 11, 2026 at 9:10 pm

    You could use an automated sequence diagram generator in Eclipse such as Diver: Dynamic Interactive Dynamic Interactive Views For Reverse Engineering. It generates both static and dynamic sequence diagrams and looks to answer your question.

    I adjusted your code a bit to make it compile and used Diver to generate a sequence diagram:

    ABC Sequence Diagram

    That is the sequence diagram for this code:

    package org.testing;
    
    public class A {
    
        static class B 
    {
        C f() {
        return new C();
        }
    }
    
    static class C {
    }
    
        public static void main(String args[]) {          
            A a = new A();
            B b = new B(); 
            C c = new C();
            c = b.f();
        }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

in UML Class Diagram i have lots of classes that Implements one Class IComponent.
Given the following sequence diagram, how to express the equivalent in a UML communication
In UML sequence diagram a method can have only one return line (at least
I'm using an UML tool that generates Java classes from the UML class diagram.
Making UML sequence diagram in VS 2010RC I've observed that there is no activation
I'm not sure how to model sub-methods in UML sequence diagram. When in the
I want to make sequence diagram by using UML diagram set in Dia. Can
In a UML class diagram, how would you display calling another activity with an
look the UML image. I've got a generic class called BinaryProblem, this one receives
I have a UML sequence diagram. Some consumer/Client sends a request, and the request

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.