R
Roedy Green
consider this line of code:
( Comparator<String> ) (Class.forName( comparatorName
).newInstance());
are the () around Class.forName( comparatorName ).newInstance()
necessary?
You could consult a precedence table, but you could misinterpret it.
Java's rules of precedence and association are quite complicated.
Is there a tool that will tell you:
1. which of your () are nugatory?
2. what your expression means were there no reliance on precedence,
handled purely with ()?
I think this would be a great tool for newbies.
( Comparator<String> ) (Class.forName( comparatorName
).newInstance());
are the () around Class.forName( comparatorName ).newInstance()
necessary?
You could consult a precedence table, but you could misinterpret it.
Java's rules of precedence and association are quite complicated.
Is there a tool that will tell you:
1. which of your () are nugatory?
2. what your expression means were there no reliance on precedence,
handled purely with ()?
I think this would be a great tool for newbies.