Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

image text in transcribed

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Design Application Development And Administration

Authors: Michael V. Mannino

4th Edition

0615231047, 978-0615231044

More Books

Students also viewed these Databases questions

Question

What aspects would it be impossible to capture?

Answered: 1 week ago

Question

Enhance your words with effective presentation aids

Answered: 1 week ago