Question: is this code correct? IH? If not, why and how would you ss Person ( static int pid; int age; String name; Person (String s,int

is this code correct?
IH? If not, why and how would you ss Person ( static int pid; int age; String name; Person (String s,int i) ++pid; name-sj age-i; class Q3 ( private Person change (Object o) ( Person p2 (Person)o; p2.age 25; return p2; public static void main(String[] args) ( Person pi new Person("John", 22); 03 te new Q30; Person p2 te.change (p1); System.out.println(p2.pid ""+p2.name+ ""+p2.age); System.out.print (p1.pid +" "+p1.name+" "+ pl.age)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
