Johnson Controls interview question

Java basics and DSA questions.