Menu
Question Index
...

Insert the line of code to show the output as - Show is 420 points.

class Play {
    private int card;
    public Play(int w) {
        card = w;
    }
    public void joker(int w) {
        card = w;
    }
    public String toString() {
        return Integer.toString(card);
    }
}
public class Playing {
    static void changePlay(Play p) {
        /* Insert Code here*/
    }
    public static void main(String[] args) {
        Play show = new Play(200);
        show.joker(1024);
        changePlay(show);
        System.out.println("Show is " + show + " points");
    }
}


p.joker(420);
p.changePlay(420);
p = new Play(420);
Play.joker(420);
p = Play.joker(420);
None of the above

Doubts

Problems

Topic: Unknown

Read this topic
Take test on this topic

0
Wrong
Score more than 2 points

© meritcampus 2019

All Rights Reserved.

Open In App