You have used OR || to combine the upper down-pointing triangle of " " and the lower up-pointing triangle of " ". Good idea.
You describe the upper triangle as (j > i && j < n - i), that is correct.
However, you describe the lower triangle as (j > (n-i) && j < i && i > n).
That is where the problem is. The i > n is never true for i from 0 to n as in your outer loop construct. In order to describe the lower half of the pattern, you should have used i>n/2. You could have however dropped that part of the condition altogether, because the counter comparisons in the first part would only apply in the lower half anyway.
So (j > (n-i) && j < i).
That gets you:
* *
** **
******
******
** **
By the way, n lines, not n+1 lines in the outer loop.
As you can see, the lower triangle of " " is much too small. Both, to the right side and to the left side.
So you need to make your conditions more generous, i.e. "lower-equal" and "higher-equal" instead of "lower" and "higher". In code (j >= (n-i) && j <= i).
Putting it together:
public class Main {
static final int n = 5;
public static void main(String[] args)
{
for(int i = 0; i < n; i++) // only n lines
{
for(int j = 0; j < n+1; j++) {
if ((j > i && j < n - i) ||
(j >= (n-i) && j <= i)) // more generous and no second condition
System.out.print(" ");
else
System.out.print("*");
}
System.out.println();
}
}
}
This code is very similar to your attempt and gets you the desired
* *
** **
******
** **
* *