Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Human {
- String name;
- String gender;
- int age;
- double weight;
- double height;
- void sayHello() {
- System.out.println("Привет!");
- }
- }
- public class Main {
- public static void main(String[] args) {
- Human[] man = new Human[10];
- for (int i = 1; i < man.length; i++) {
- man[i] = new Human();
- man[i].sayHello();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement