M
manzur
I have a class SnapShot.java
public class SnapShot{
private Double bal;
private Double avg;
public addBal(Double bal){
Some Code
Switch(bal.intValue){
case1:do something
case2:do something
case3:do something
}
}
}
I am interested in getting the fields.So i did like this
Class theClass = SnapShot.class;
Field[] fields = theClass.getDeclaredFields();
for (int i = 0; i < fields.length; i++) {
System.out.println("fields:::"+fields);
}
The output should be display only two fields.but it is displaying three
fields.It is taking switch as also instance variable
thanks in advance
public class SnapShot{
private Double bal;
private Double avg;
public addBal(Double bal){
Some Code
Switch(bal.intValue){
case1:do something
case2:do something
case3:do something
}
}
}
I am interested in getting the fields.So i did like this
Class theClass = SnapShot.class;
Field[] fields = theClass.getDeclaredFields();
for (int i = 0; i < fields.length; i++) {
System.out.println("fields:::"+fields);
}
The output should be display only two fields.but it is displaying three
fields.It is taking switch as also instance variable
thanks in advance