I am using JavaParser to parse through the contents of the following code and identify the sequence of statements: The code I am using to parse the above example: What I would also like to do is to identify if the current statement is an expression statement (i.e., assignment), and if yes, find if it is the last statement contained
Advertisement
Tag: statements
Transforming if-else into switch case throws error [Java]
I tried to convert my if-else statements into a switch case but I had the following problem. Old code: if (properties.get(“database”).toString().equalsIgnoreCase(“SQLSERVER”)) { …
Advertisement