Hello
2. There are lot many questions like 20-30 and
i will hae to create 30 variables though it is safe way and wont have miscalculation chances.
I see, and why not create or consider something like this
Code:
public class Exam{
....
private List<Question> questions;
}
Therefore when you start the flow process you can create the Class Exam and pre populate a desired list of questions, and you only have one var and not 30 variables instead
and each question (well most of the times) based on user's answer might take to different question.
You could consider create the Exam class with the List with just only one Question, therefore each time you "NEXT" you can add other question to the list according with the answer
HTH