Skip to Main Content

New to Java

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

Create an java object with a method

User_99SIXMar 24 2021

In the scenario of 2 classes, A and B. Can an object in class B call the constructor in class A using a method? I don't know what I am thinking applied to the real world. Thinking on a Ordering system analogically, A is Menu class and B is a Waiter class. Waiter should be add/remove/update menu item object dynamically right?

Comments

Processing

Post Details

Added on Mar 24 2021
0 comments
14 views