Вроде все сделано правильно
package com.javarush.task.pro.task03.task0306;
import java.util.Scanner;
/*
Треугольник
*/
public class Solution {
private static final String TRIANGLE_EXISTS = "треугольник существует";
private static final String TRIANGLE_NOT_EXISTS = "треугольник не существует";
public static void main(String[] args) {
Scanner s = new Scanner(System.in);
int one = s.nextInt(); int two = s.nextInt(); int three = s.nextInt();
boolean sumOT = (one + two) > three; boolean sumTT = (two + three) > one; boolean sumTO = (three + one) > two;
if (sumOT){
if (sumTT)
if (sumTO)
System.out.println(TRIANGLE_EXISTS);
}
else
System.out.println(TRIANGLE_NOT_EXISTS);
}
}