Link to home
Start Free TrialLog in
Avatar of Sathish David  Kumar N
Sathish David Kumar NFlag for India

asked on

What is mean by (Baseline) JAVA0049 Nested block at depth '6' (maximum: '5')

What is mean by (Baseline) JAVA0049 Nested block at depth '6' (maximum: '5') ?

How to resolve this  ?
Avatar of Mick Barry
Mick Barry
Flag of Australia image

Nested Block Depth
It refers to the maximum nesting of blocks found in a method. Deeply nested blocks may make the code difficult to understand. Deeply nested blocks may be avoided by moving the code to separate method.

http://www.appperfect.com/support/docs/java-code-test/codetest/analyzing_results.html

Means your code has too many leveles of nesting

eg.

for (int i=0; i<5; i++) {    // 1 level
   if (c==x) {    // 2levels
      ....
ASKER CERTIFIED SOLUTION
Avatar of Mick Barry
Mick Barry
Flag of Australia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Sathish David  Kumar N

ASKER

how to avoid in depth code?

if i write seprated function then it will coming under exit right?
you break it into separate methods
OK i will write 2 methos .
but while calling a method that will causing exit (my other question u answer like that ) right ?
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial