Question: IN JAVA Rewrite the class below so it no longer specifically handles integer data. It should be able to handle any data type presently available

IN JAVA

Rewrite the class below so it no longer specifically handles integer data. It should be able to handle any data type presently available or any type created in the future.

NOTE: Using the "Object" class is not allowed.

HINT: Think about how an ArrayList can be declared using different data types.

class DataHandler { private int mData; int getData() { return mData } void setData(int _data) { mData = _data; } void logData() { Log.d(getClass().getName(), String.format("Data: %d", mData)); } }

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!