+91-85006-22255
What will be the output of the following program?
public class Rose { public Rose(String name) { System.out.println("Passed Name is :" + name); } public static void main(String[] args) { Rose myRose = new Rose("red"); myRose = new Rose("white"); }}
Topic: Create Objects Using Constructors In Java
Read this topic Take test on this topic
Open In App