Skip to content
Advertisement

Basic Java Fundamentals

Attempting to call a method that’s in another object

JavaScript

Using this loop

JavaScript

However the Shred method is not able to be found using my code

Advertisement

Answer

That is a constructor not a method. And the constructor will return a Shred. It isn’t clear what allShreds is, but assuming it’s a String you could do

JavaScript
User contributions licensed under: CC BY-SA
6 People found this is helpful
Advertisement