Advertisement
joyonto51

1. Correct Java Code With Outpu

Jul 4th, 2020
2,144
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 5 0.24 KB | None | 0 0
  1. class Rectangle {
  2.   double length;
  3.   double breadth;
  4. }
  5.  
  6. public class RectangleDemo {
  7.   public static void main(String args[]) {
  8.     Rectangle myrect1 = new Rectangle();
  9.     System.out.println(myrect1.length);
  10.   }
  11. }
  12.  
  13. // Output - 0.0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement