Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
package ir.soheil_gh;
public class LocalVariableTypeInferenceExample3WithError {
public static void main(String[] args) {
var test = {1,2,3};
}
}
@soheil-ghahremani

This comment has been minimized.

Copy link
Owner Author

@soheil-ghahremani soheil-ghahremani commented Sep 12, 2019

Error:(5, 13) java: cannot infer type for local variable test (array initializer needs an explicit target-type)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.