if(a< (b+c)||(b< (a+c)))
System.out.println("The triangle is possible.");
else
System.out.println("The triangle is not possible");
if(b< (a+c)||(c<(a+b)))
System.out.println("The triangle is possible.");
else
System.out.println("The triangle is not possible.");
if (c< (a+b)||(a<b+c))
System.out.println("The triangle is possible.");
else
System.out.println("The triangle is not possible.");

package com.codegym.task.task04.task0415;
/*
Rule of the triangle
*/
import java.io.*;
import java.util.Scanner;
public class Solution {
public static void main(String[] args) throws Exception {
//write your code here
Scanner sc = new Scanner(System.in);
int a = sc.nextInt();
int b = sc.nextInt();
int c = sc.nextInt();
if(a< (b+c)||(b< (a+c)))
System.out.println("The triangle is possible.");
else
System.out.println("The triangle is not possible");
if(b< (a+c)||(c<(a+b)))
System.out.println("The triangle is possible.");
else
System.out.println("The triangle is not possible.");
if (c< (a+b)||(a<b+c))
System.out.println("The triangle is possible.");
else
System.out.println("The triangle is not possible.");
}
}

two sides is greater than the third side. You need to compare each side with the sum of the other two.ANYone side is larger or equal to the sum of the other two sides, then no such triangle exists. So an equilateral triangle with dimensions 1x1x1 could exist, because 1+1 is always greater than 1. Same with a triangle with dimensions 3x4x5, because no matter which 2 sides you add, it's always greater than the 3rd side. You can get by with one compound condition, like ... else, the triangle can't exist. Hope this helps!EVEN IF