Is there any tool or any way to check the flow control of the program in java, step by step.
I often used to get lost in between the code how the flow of the program is working. what should I do for that?
When i write any program say just for practice How should I check its flow control ?
what is the way to get understanding of how my programs control moving step by step? Help Please
package com.codegym.task.task04.task0427;
/*
Describing numbers
*/
import java.io.*;
public class Solution {
public static void main(String[] args) throws Exception {
//write your code here
BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
int num = Integer.parseInt(reader.readLine());
int count = 0;
if (num>0 && num<1000){
while(num!=0){
num=num/10;
count++;
if (num%2==0 && count==1)
System.out.println("even single-digit number");
else if (num%2 == 1 && count==1)
System.out.println("odd single-digit number");
else if (num%2==0 && count==2)
System.out.println("even two-digit number");
else if (num%2 == 1 && count==2)
System.out.println("odd two-digit number");
else if (num%2==0 && count==3)
System.out.println("even two-digit number");
else if (num%2 == 1 && count==3)
System.out.println("odd two-digit number");
}
}
}
}