Question about Sun Java Programming Language (cdj-275)

2 Answers

Triangle output in java programming

Triangle output in java

Posted by on


2 Answers

  • Level 1:

    An expert who has achieved level 1.


    An expert whose answer got voted for 2 times.

  • Contributor
  • 1 Answer


Posted on Oct 04, 2010

  • Level 1:

    An expert who has achieved level 1.


    An expert that got 5 achievements.


    An expert whose answer got voted for 20 times.


    An expert who has answered 20 questions.

  • Contributor
  • 30 Answers

Import java.util.Scanner; public class triangle { public static void main(String[] args) { double sidea; double sideb; double sidec; Scanner in = new Scanner(; System.out.println("Enter the first side of a triangle: "); sidea = in.nextDouble(); System.out.println("Enter the second side of a triangle: "); sideb = in.nextDouble(); System.out.println("Enter the third side of a triangle: "); sidec = in.nextDouble(); System.out.println("Sides" + " " + sidea + " " + sideb + " " + sidec); if (((sidea * sidea) + (sideb * sideb)) == (sidec * sidec)) System.out.println("right triangle"); if (((sidea * sidea) + (sidec * sidec)) == (sideb * sideb)) System.out.println("right triangle"); if (((sidec * sidec) + (sideb * sideb)) == (sidea * sidea)) System.out.println("right triangle"); //right triangle if ((sidea == sideb) && (sidea == sidec) && (sideb == sidec)) System.out.println("equilateral triangle"); //equilateral triangle if (((sidea == sideb) || (sideb == sidec) || (sidea == sidec)) && !((sidea == sideb) && (sidea == sidec) && (sideb == sidec))) System.out.println("isosceles triangle"); else (!((sidea == sideb) && (sidea == sidec) && (sideb == sidec))) System.out.println("scalene triangle"); //scalene if (((sidea + sideb) >= (sidec)) ||((sidea + sideb) >= (sideb)) ||((sideb +sidec) >= (sidea))) System.out.println("not a triangle"); } }

Posted on Jul 23, 2010


1 Suggested Answer

  • 2 Answers

SOURCE: I have freestanding Series 8 dishwasher. Lately during the filling cycle water hammer is occurring. How can this be resolved

Hi there,
Save hours of searching online or wasting money on unnecessary repairs by talking to a 6YA Expert who can help you resolve this issue over the phone in a minute or two.

Best thing about this new service is that you are never placed on hold and get to talk to real repairmen in the US.

Here's a link to this great service

Good luck!

Posted on Jan 02, 2017

Add Your Answer

Uploading: 0%


Complete. Click "Add" to insert your video. Add



Related Questions:

1 Answer

Tm u220 java

Are you printing from inside a java program (output) or from a java program editor.
Use the command to Open an output file, have all your output sent to the output file, close the output file properly before you exit the java program. After you finish send the output file to the matrix printer as you would with ASCII file. If the printer is installed properly, your OS should know where to send the output.

Dec 23, 2013 | Epson TM-U220 Matrix Printer

2 Answers

Compute the area of triangle

Hi nanaeden

Use the formula depending on what is given
If one side and vertical height from that side to the opposite vertex is given, use the formula 1/2 of basexheight
If 3 sides of the triangle are given use the formula
sq root of [ s(s-a)(s-b)(s-c)] where a,b, c are the 3 sides and s is semi- perimeter.
Familiarise with formulae to solve Maths problems.
If it is helpful, please give a rating.
Have a nice day

Nov 25, 2009 | Cell Phones

4 Answers

Can anyone tell how run java program in cmd prompt???


You need to type:

If it's a program.class

java program

or of it's a program.jar

java -jar program.jar


Apr 03, 2009 | Sun Java Programming Language (cdj-275)

1 Answer

Certain pictures and vidoes dont open or play

Hello fgskas,

This is due to not having the correct plugin on the computer to view these pictures and videos. You may want to try downloading flash and java updates. You can get flash from and you can get java from

Mar 30, 2009 | Dell Dimension 4700 PC Desktop

1 Answer

Before downloading Yahoo Messenger 9.0, I could view videos on the Internet but now where the video used to be, there is just a big white box and a small box in the upper left corner with red & blue...

You are missing either a video codec or possibly need to update Flash and/or Java. - to update flash player - to update Java

Mar 19, 2009 | Computers & Internet

1 Answer


update java once shockwave player and flash windows update run tool k

Oct 09, 2008 | Computers & Internet

1 Answer

Java programming: file access

( this is the error in java, How can I rectify it;

Aug 29, 2008 | Computers & Internet

1 Answer

When visiting a site such as Friends Reunited I cannot view the site as I keep getting a message up with a yellow exclamation mark in a triangle saying: Error in addLoadEvent:(object error). I have typed...

It appears to be a Java script error.
The chances are some pages your are visiting are using Java script to deliver multilayer messages or adverts.
If you didn't have Java script installed on your machine you would get an error along the lines of "page was unable to load" so I am guessing your Java script needs updating.
Go to this site: you can either download Java or have the site check your computer to see if it has the latest copy(easiest method).

Aug 12, 2008 | Computers & Internet

3 Answers

Jawa void

you should not use arguments in void function in java ... in java pertaining to void the compiler doesn't understand the arguments and treats that as invalid... in c it is ok

Aug 07, 2008 | Sun Java Studio Standard 5 (SSJI9501TL9M)...

1 Answer


UNINSTALL your old version of Java, then Install the updated version, - this works, in that order....

Dec 26, 2007 | Computers & Internet

Not finding what you are looking for?
Computers & Internet Logo

614 people viewed this question

Ask a Question

Usually answered in minutes!

Top Sun Computers & Internet Experts

Les Dickinson
Les Dickinson

Level 3 Expert

18425 Answers

Robin Hill
Robin Hill

Level 3 Expert

1271 Answers


Level 3 Expert

8073 Answers

Are you a Sun Computer and Internet Expert? Answer questions, earn points and help others

Answer questions

Manuals & User Guides