Advertisement
desant74268

OOPHW

Jan 16th, 2022
638
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. package ru.itsjava.oop.hw;
  2.  
  3. public class Bird {
  4.  
  5.     private final String species;
  6.     private double wingspan;
  7.  
  8.     public Bird(String species, double wingspan) {
  9.         this.species = species;
  10.         this.wingspan = wingspan;
  11.     }
  12.  
  13.     public String toString(){
  14.         return "Species: " + species + " / " + "Wingspan: " + wingspan;
  15.     }
  16. }
  17.  
Advertisement
Advertisement
Advertisement
RAW Paste Data Copied
Advertisement