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:
1 2 3 4 5 6 7 8 9 10 11 |
//Example public class UnderscoreNotAllowed { private static String _ = "Name"; public static void main(String[] args) { System.out.println(_); } } |
Output:
1 |
'_' should not be used as an identifier, since it is a reserved keyword from source level 1.8 on |