About 7,460,000 results
Open links in new tab
  1. java - Constructing Rectangle - Stack Overflow

    import java.awt.Rectangle; public class Rectangle { public static void main (String [] args) { Rectangle box= new Rectangle (5,10,20,30); System.out.println (box); } }

  2. Create a Rectangle class in Java and calculate area, perimeter

    Sep 7, 2021 · With this tutorial, you will learn how to create a class in Java and how to access its methods and parameters. We will follow the following steps: Create one Rectangle class. This …

  3. Creating a rectangle class in Java

    a. Create a class Rectangle. The class has attributes length and width, each of which defaults to 1. It has methods that calculate the perimeter and the area of the rectangle. It has set and get …

  4. Rectangle (Java Platform SE 8 ) - Oracle

    A Rectangle specifies an area in a coordinate space that is enclosed by the Rectangle object's upper-left point (x,y) in the coordinate space, its width, and its height.

  5. Create a New Java Class Rectangle – Java Program

    Jul 10, 2019 · Create a new Java Class Rectangle – This Python Tutorial will explain the creation of a new Java class named Rectangle with the following class specification: Write a Java …

  6. Java - Calculate area and perimeter of a rectangle - w3resource

    5 days ago · Java Object Oriented Programming - Create a class called Rectangle with width and height attributes, calculates the area and perimeter of the rectangle, and demonstrates how to …

  7. Creating a Java Rectangle Class with Parameterized and Copy …

    May 15, 2025 · Write a Java program to create a class called Rectangle with instance variables length and width. Implement a parameterized constructor and a copy constructor that …

  8. Creating and Testing a Custom Rectangle Class in Java

    Feb 28, 2025 · Create a class named Rectangle with: - Private instance variables: length and width - A constructor that initializes these variables - Getter and setter methods for both …

  9. Java Class Rectangle Example - Computer Notes

    The Rectangle class contains two fields length and breadth of type int that correspond to the length and breadth of the rectangle respectively. In addition, the Rectangle class also contains …

  10. Problem 4 (Rectangle Class) Create a class... [FREE SOLUTION]

    Write a program to test class Rectangle. Create a `Rectangle` class with length and width; include validation in setters, and methods for area and perimeter. Begin by creating a class named …

  11. Some results have been removed
Refresh