JAVA
java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
import java.io.InputStreamReader;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Scanner;
import java.io.BufferedReader;
import java.io.IOException;
public class Trigsquare {
double a;
double b;
double c;
public Trigsquare(double a, double b, double c) {
this.a = a;
this.b = b;
this.c = c;
}
public boolean isTriangle() {
boolean flag = false;
if(this.a > 0 && this.b > 0 && this.c > 0 ) {
if((this.a + this.b) > this.c && (this.a + this.c) > this.b && this.b + this.c > this.a) {
flag = true;
}
}
return flag;
Enter to Rename, Shift+Enter to Preview
OUTPUT
Run