Difference between while and do while loop in java:
|while loop||do while loop|
|Checks the condition before executing the statement.||It first executes the statement and then checks the condition.|
|Entry controlled loop.||Exit controlled loop.|
|Condition comes before the body.||Condition comes after the body.|
|Statement(s) are executed at least once.|
Output: No output.
Output: j value is: 10