fosterbl

CircleRunner.java

Oct 28th, 2019
107
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.41 KB | None | 0 0
  1. public class CircleRunner{
  2.    public static void main(String[] args){
  3.       //Instantiation of c1
  4.       Circle c1 = new Circle();
  5.       //Call methods on c1
  6.       c1.setRadius(5.0);
  7.       System.out.println( c1.circumference() );
  8.      
  9.       //Instantiation of c2
  10.       Circle c2 = new Circle();
  11.       //Call methods on c2
  12.       c2.setRadius(3.0);
  13.       System.out.println( c2.circumference() );
  14.    }
  15. }
Add Comment
Please, Sign In to add comment