Input
Output
public class Defaultconstructor { public static void main(String args[]){ Rectangle r1=new Rectangle(); } } class Rectangle { int length=5,breadth=6; float area; Rectangle() //constructor { System.out.println("Enter the length and breadth value: "+length+" "+breadth); area= length * breadth; System.out.println("Area of the Rectangle: "+area); } }