What is true about var?
QuizEasy-MediumJava only
Which statements about var in Java 21 are true? Pick all that apply.
var name = "admin";givesnamethe type String at compile timevarcan be used for fields of a classvar x;with no initial value does not compile- After
var n = 5;you can writen = "five";
This question is part of Pro+
Pro+ opens every question in Interview Prep and the mock interview. Every article and the first 2 questions of each topic stay free. Hands-on Selenium and API tasks follow their course lesson's own lock.