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 322 times
Edit
3
Community EvaluationsNo one has reviewed this question yet, be the first!