How can i put one argument in my system.out.println in my code? | SoloLearn: Learn to code for FREE!

0

How can i put one argument in my system.out.println in my code?

To put one argument like this. https://code.sololearn.com/ccIKV8kLj25H/?ref=app

5/15/2020 6:30:13 AM

Malick Diagne

2 Answers

New Answer

0

You need to override your objects toString() method so it outputs the information from that object you wish to see. https://www.tutorialspoint.com/override-the-tostring-method-in-a-java-class https://devqa.io/overriding-tostring-java-class/ https://www.google.com/amp/s/www.geeksforgeeks.org/overriding-tostring-method-in-java/amp/

0

Also, in your StockmanMalick classes Work() method change nom to stockmanMalicknom to avoid error.