Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package com.Mouamle.test;
- class Player {
- String Name;
- String Job;
- int Age;
- int Money;
- void speak() {
- System.out.println("Hello my name is: " + Name );
- System.out.println("My age is: " + Age);
- System.out.println("My job is: " + Job);
- System.out.println("I Have: " + Money + " Money!");
- System.out.println("--------------------------------");
- }
- }
- class Car {
- String Model;
- String NumbersPanel;
- int Id;
- int WheelsSize;
- }
- class Shoop {
- String ItemName;
- String ItemType;
- int ItemId;
- int ItemPrice;
- }
- class World {
- String Type;
- int SizeX, SizeY;
- int Id;
- }
- public class Objucts {
- public static void main(String[] args) {
- Player Player1 = new Player();
- Player1.Name = "Mouamle";
- Player1.Age = 16;
- Player1.Money = 500 * 1000;
- Player1.Job = "Programmer";
- Player1.speak();
- Player Player2 = new Player();
- Player2.Name = "Rafat";
- Player2.Age = 16;
- Player2.Money = 500 * 100;
- Player2.Job = "Programmer";
- Player2.speak();
- World World1 = new World();
- World1.Id = 0;
- World1.SizeX = 100;
- World1.SizeY = 100;
- World1.Type = "Flat";
- Car Car1 = new Car();
- Car1.Id = 0;
- Car1.Model = "Proton";
- Car1.NumbersPanel = "D19879";
- Car1.WheelsSize = 17;
- Shoop Shoop1 = new Shoop();
- Shoop1.ItemId = 0;
- Shoop1.ItemName = "Apple";
- Shoop1.ItemPrice = 500;
- Shoop1.ItemType = "Food";
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement