Exercises

   

Java™ 2 Primer Plus
By Steven Haines, Steve Potts

Table of Contents
Chapter 5.  Methods


1:

Implement the isPrime method mentioned in the chapter and test it from your main method.

2:

Write a method that computes the area of a circle. Note the area formula is

 area = PI * r * r 

3:

Write a series of methods that compute the area of a rectangle for int, long, and double values.


       
    Top
     



    Java 2 Primer Plus
    Java 2 Primer Plus
    ISBN: 0672324156
    EAN: 2147483647
    Year: 2001
    Pages: 332

    Similar book on Amazon

    flylib.com © 2008-2017.
    If you may any questions please contact us: flylib@qtcs.net