Java 9 – Underscore “_” can not be legal identifier

Since Java 8, underscore “_” was marked for removal as legal identifier i.e. variable / method name etc. & was giving warning. In Java 9, it has been completely removed & it will give compiler error.

Example:

Output:

 

Leave a Reply

Your email address will not be published.