Write a java program to show the implementation of constructor overloading
Answers
Answered by
0
Answer:
// An example class to understand need of // constructor overloading. class Box { double width, height,depth; // constructor used when all dimensions // specified Box(double w, double h, double d) { width = w; height = h; depth = d; } // compute and return volume double volume() { return width * height * depth; } }
Similar questions
English,
3 hours ago
History,
3 hours ago
Social Sciences,
3 hours ago
English,
5 hours ago
Math,
8 months ago