Question from the Java test

Compile the following method: public void doSomething() { String s1 = "s1"; var s2 = "s2"; val s3 = "s3"; s3 = "s4"; }

Medium

What is the result of compiling the following method

public void doSomething() {
    String s1 = "s1";
    var s2 = "s2";
    val s3 = "s3";
    s3 = "s4";
}
Author: LoïcStatus: PublishedQuestion passed 288 times
Edit
2
Community EvaluationsNo one has reviewed this question yet, be the first!