Question: identify bugs and write tthe correct program 5) Identify bugs in the following piece of code ( marks=6) final class Person{ public String name; private

identify bugs and write tthe correct program
5) Identify bugs in the following piece of code ( marks=6) final class Person\{ public String name; private int age; abstract class Worker extends Person\} private static void main(String args[]) \{ x Worker w= new Person("Ali"); System.out.println("The name is "+name); 1 w.age =23 public void storeData() try \{ File f= new File("cillabc.txt"); if(lf.canWrite()) throws new IOException0; f. writelnt(23); FileOutputStream fos = new FileOutputStream(new ObjectOutputStream ("c:/a.txt")); fos.writeObject(this); \} catch(Exception e) \{\} catch(IOException f){} \}
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
