Menu
Topics Index
...
`

Song


If you need explanation Read this topic

If you need Answer Take test on this topic

Song
What will be the output of the following program?
public class UsingProperty {
    public static void main(String args[]) {
        System.setProperty("Singer", "Song");
        System.getProperty("Director");
        System.out.println(System.clearProperty("Singer"));
    }
}

A. (EMPTY)
B. Song
C. Director
D. Compilation Error or Runtime Error
Topic: Java Environment Properties

If you need explanation Read this topic

If you need Answer Take test on this topic

User comments below. All of them might not be correct.

b)  Song

Posted by Amruth Reddy    2014-03-28 04:09:11


Ans is b it clears singer and prints song

Posted by Bharath Yelchuri    2014-03-28 04:45:03


ans B:key the name of the system property to be removed...the previous string value of the system property, or null if there was no property with that key.

Posted by Ashok Reddi    2014-03-28 04:45:34


Congratulations Ashok Reddi. You are this dose winner. We will send you the link using which you can claim your recharge.

Posted by Merit Campus    2014-03-31 06:27:56


© meritcampus 2019

All Rights Reserved.

Open In App