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