package com.codegym.task.task02.task0202;
/*
Where does a Person come from?
*/
public class Solution {
public static void main(String[] args) {
VariableType variableName = new TypeOfObjectBeingCreated(person);
VariableType.TypeOfObjectBeingCreated(person);
}
public static class Person(String TypeOfObjectBeingCreated){
String VariableType;
String name;
int age;
int weight;
int money;
}
}
what is the problem with this code just clearify this code that how will it work
Under discussion
Comments (2)
- Popular
- New
- Old
You must be signed in to leave a comment
Jobin John
14 August 2018, 15:55
This part of the question "VariableType variableName = new TypeOfObjectBeingCreated()"
is meant to be an example of the format using which you will be creating the object. Here, the VariableType is "Person". The task requires you to create a variable of type "Person", create an object of the Person class and assign it to the variable you created.
So, keeping that in mind, give it another try and let us know if you were able to get through.
0
Pavlo Plynko Java Developer at CodeGym
12 August 2018, 19:33
You should use real values instead: VariableType, variableName, TypeOfObjectBeingCreated
+1