Question
simple Java****.I have 3 classes (ad, shp,sim). ad has 3 string and getter and setter. shp has ad list object. and sim has main method
simple Java****.I have 3 classes (ad, shp,sim). ad has 3 string and getter and setter. shp has ad list object. and sim has main method and setting value. but for some reason I didn't get any value when I run it. please help me.
package simulation;
public class ad { private String model; private String size; private String colore; public String getModel() { return model; } public void setModel(String model) { this.model = model; } public String getSize() { return size; } public void setSize(String size) { this.size = size; } public String getColore() { return colore; } public void setColore(String colore) { this.colore = colore; } } -----------------------------------------------------
package simulation;
import java.util.List;
public class shp { private List
public List
public void setAdd(List
--------------------------
package simulation;
import java.util.ArrayList; import java.util.List;
public class sim { public static void main(String[] args) { ad obj= new ad(); List
______________
the output [simulation.ad@15db9742]
-----------------------
I suppose to get blue,suv,big
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started