Sre Interview Questions

1,932 sre interview questions shared by candidates

Context: We have a class called Bar and takes an object of type Foo as a dependency. This dependency is declared within the Bar class as read-only or final. Q3: If I write a method called "DoSomething" and its job is to replace the value of a property of Foo. Will I get a compiler exception, am I even able to do this? Provide visual of code below as part of the question public class Bar ( private read-only Foo foo; public Bar(Foo foo) { this.foo = foo; } public void DoSomething € foo sample = "new value"; } !.. var bar = new Bar(new Foo0); bar.DoSomethingO;
avatar

SRE Engineer

Interviewed at Shell Recharge Solutions

4
Oct 11, 2024

Context: We have a class called Bar and takes an object of type Foo as a dependency. This dependency is declared within the Bar class as read-only or final. Q3: If I write a method called "DoSomething" and its job is to replace the value of a property of Foo. Will I get a compiler exception, am I even able to do this? Provide visual of code below as part of the question public class Bar ( private read-only Foo foo; public Bar(Foo foo) { this.foo = foo; } public void DoSomething € foo sample = "new value"; } !.. var bar = new Bar(new Foo0); bar.DoSomethingO;

Viewing 921 - 930 interview questions

Glassdoor has 1,932 interview questions and reports from Sre interviews. Prepare for your interview. Get hired. Love your job.