Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class WC2018{
- public static void main(String [] args){
- Player p1 = new Player();
- p1.setName("Neymar");
- p1.setNumber(10);
- p1.setTeam("Brazil");
- p1.detail();
- System.out.println("---------------------------");
- Player p2 = new Player("Ronaldo");
- p2.setNumber(7);
- p2.setTeam("Portugal");
- p2.detail();
- System.out.println("---------------------------");
- Player p3 = new Player("Messi", 10);
- p3.setTeam("Argentina");
- p3.detail();
- System.out.println("---------------------------");
- Player p4 = new Player("Neuer", 1, "Germany");
- p4.detail();
- }
- }
- Complete the Player class so the main method above produces the following output:
- Neymar*is*no.10*for*Brazil
- ---------------------------
- Ronaldo*is*no.7*for*Portugal
- ---------------------------
- Messi*is*no.10*for*Argentina
- ---------------------------
- Neuer*is*no.1*for*Germany
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement