In the Person class, declare the following variables: String name, int age, int weight, int money.
In the main method, create a Person object and store a reference to it in the variable person.
Hint: Use the following construct to create a Person object and assign a reference to that object to the variable person:
VariableType variableName = new TypeOfObjectBeingCreated();
package com.codegym.task.task02.task0202;
/*
Where does a Person come from?
*/
public class Solution {
public static void main(String[] args) {
//write your code here
public Person(String name, int age, int weight, int money);
}
public static class Person {
//write your code here
String name;
int age;
int weight;
int money;
}
}