RectMaker

RectMaker - Rectangle rec3; rec3 = new Rectangle(); int val;

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
public class RectMaker { p public static void main (String[] args) { System.out.println("making rectangles"); Rectangle rec1; rec1 = new Rectangle(); Rectangle rec2; rec2 = new Rectangle();
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Rectangle rec3; rec3 = new Rectangle(); int val; rec2.setLength(8.0 ); System.out.println(rec1.area()); System.out.println(rec2.area()); System.out.println(rec3.area()); } }...
View Full Document

This note was uploaded on 11/30/2009 for the course COMP 110 taught by Professor Stotts during the Spring '08 term at UNC.

Ask a homework question - tutors are online