#291 Checking List Elements for Tradability

Companies:
InfiniteSynergy
Themes:
JavaStreams & LambdasPractice

Write the if condition correctly:

class Instrument {
    // Class representing an instrument
    // ...

    @Getter
    boolean traded; // Field indicating whether the instrument is tradable
}

// ...

List<Instrument> instruments; // List of instruments

// ...

if (  ) {
    // This code must execute if all instruments in the instruments list are tradable
}

Question review

Mentor
Answer as you would in a real interview. I’ll ask follow-up questions, then compare your answer with the reference answer and show your accuracy as a %.
Sign in to start the dialogue The mentor keeps the context of the current question and your previous messages.
Sign in