when using VariableDeclarationExpr to get variable of a class , For ex:
Class A{
public void test(){
String s = "a";
if(x==y)
s = "test"
}
I am getting only one instance i.e s = "a" , is it an issue , or it was the expected behaviour.
In your sample, it's the only variable declaration.
yes, the second one
s=test
is an AssignmentExpr
I am able to get using AssignmentExpr. Thank you.