Problems with JAVA calling other class methods

if there are two classes An and B. There is a method in class B that is not in class A. The object an of class A that I want to generate needs to do something using method c in class B. So I pass an into class B, B (a), and instantiate class B to generate object b, and manipulate object a through B. c what"s going on.

Dec.02,2021

since a uses method c in B, why use to manipulate the object a through b.c? Do you still need to manipulate an object in the c () method?
if not, you can let a hold the object of B through An a = new A (b) instantiation or other methods, and then complete the a you need in the A.D () method to perform some operations using method c in class B. For example, the b.c ()


um is called in the body of the d method. I already understand. Thank you

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e94307-47290.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e94307-47290.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?