Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- * To change this license header, choose License Headers in Project Properties.
- * To change this template file, choose Tools | Templates
- * and open the template in the editor.
- */
- package myworld;
- /**
- *
- * @author fmi
- */
- public class MyWorld {
- /**
- * @param args the command line arguments
- */
- public static void main(String[] args) {
- // TODO code application logic here
- System.out.println("I am proud with my greates invention PI " + Person.PI);
- Person.nationality = "German";
- Person stoyan = new Person("Stoyan", 50);
- // stoyan.name = "Stoyan";
- // stoyan.age = 50;
- // stoyan.setName("Stoyan");
- // stoyan.setAge(50);
- // System.out.println("I am a person! My name is " + stoyan.name + ". I am " + stoyan.age + " years old!");
- // System.out.println("I am a person! My name is " + stoyan.getName() + ". I am " + stoyan.getAge() + " years old!");
- stoyan.introduceYorSelf();
- Person mariya = new Person("Mariya", 21);
- // mariya.name = "Mariya";
- // mariya.age = 21;
- // mariya.setName("Mariya");
- // mariya.setAge(21);
- // System.out.println("I am a person! My name is " + mariya.getName() + ". I am " + mariya.getAge() + " years old!");
- mariya.introduceYorSelf();
- Person anonymous = new Person();
- // System.out.println("I am a person! My name is " + anonymous.getName() + ". I am " + anonymous.getAge() + " years old!");
- anonymous.introduceYorSelf();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement