I have a class named StatisticFrame. This class creates an object named stats inside a method. How can I pass this object created from StatisticFrame class to another class?
I have a class named StatisticFrame . This class creates an object named stats
Share
Keep a variable that will point to the receiver object (say of type TargetFrame class) in your StatisticFrame class and then invoke the method (say SetStatsObject(object obj)) defined in the receiver object to receive the object.
your StaticFrame class will look like this
and your TargetFrame (the receiving object’s class) should look like this