The problem is that you do not have the fields name, age, and weight in your Human class. I don't know Java that well to know why your code was compiling in the first place. Probably this was just pointing to the same local variable?
I'd fix your problem like this:
Human.java:
public class Human
{
private String name;
private int age;
private double weight;
Human(String name, int age, double weight)
{
this.name = name;
this.age = age;
this.weight = weight;
}
public String getName() { return name; }
public int getAge() { return age; }
public double getWeight() { return weight; }
}
Main.java:
public class Main
{
public static void main(String[] args)
{
Human human1 = new Human("Matthew", 21, 140);
Human human2 = new Human("Lucas", 19, 130);
System.out.println(human1.getName());
System.out.println(human1.getAge());
System.out.println(human1.getWeight());
System.out.println();
System.out.println(human2.getName());
System.out.println(human2.getAge());
System.out.println(human2.getWeight());
}
}