Basics_Que_20

Home / Java Practice Question / Basics_Que_20

Basics_Que_20


Write a program to input all sides of a triangle and check whether triangle is valid or not.....

program : 



public class Basics{

public static boolean isValidTriangle(int side1 , int side2 ,int side3){

if(side1+side2<=side3 || side2+side3<=side1 || side1+side3<=side2){
return false;
}else {
return true;
}
}

}