Search code examples
javavariables

Java Keywords as a variable


In VB.NET, we can surround a variable name with brackets and use keywords as variable names, like this:

Dim [new] As String = ""

C# equivalent:

string @new = "";

I was wondering is there a Java equivalent to doing this?


Solution

  • No. You can add an underscores or somesuch nonsense, but basically keywords are off limits.