Question: analyze the code and find the error and fix the error. package fHist; public class famHist { String name = Lawrence Magee; static String family
analyze the code and find the error and fix the error.
package fHist;
public class famHist {
String name = "Lawrence Magee";
static String family = " 1 wife, 1 daughter";
public void famRecord(String name, String obj, String family) {
this.name = name;
famHist.family = family;
}
public static void main(String[] args) {
LawrenceMagee ob = new LawrenceMagee();
System.out.println("this is your immidiate family history");
System.out.println(" Your name: " + ob.name);
System.out.println(" Family Members" + family);
}
}
Step by Step Solution
There are 3 Steps involved in it
The error in the provided code is that the main method is trying to create an instance of the ... View full answer
Get step-by-step solutions from verified subject matter experts
