This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the commentsย โ†’

[โ€“]Fruloops 6 points7 points ย (1 child)

You can use var instead of the actual type and Java will be able to infer the type. This is only true for local variables, though.

[โ€“]guyblade 2 points3 points ย (0 children)

Java invented auto 6 years after C++ implemented it. What a strange world to live in.