The program below is the answer to Liang’s Introduction To Java Programming (9th Edition) Chapter 1 Exercise 1.8.

1 2 |
/**<br /> *<br /> * @Author: Aghatise Osazuwa<br /> * Website: www.cscprogrammingtutorials.com<br /> *<br /> * Exercise 1.8 - Area And Perimeter Of A Circle<br /> *<br /> */ <br /><br />public class Ex01_08 {<br /><br /> public static void main(String[] args) {<br /><br /> System.out.println("Radius of circle = 5.5");<br /> System.out.println("Perimeter = 2 x radius x pi = " + 2 * 5.5 * Math.PI);<br /> System.out.println("Area = radius x radius x pi = " + 5.5 * 5.5<br /> * Math.PI);<br /><br /> }<br />}<br /> |

Click here to see other solutions to Introduction to Java Programming.