Menu
Question Index
...

Write a program to form indian cricket team from bastsman and bowlers.

Input (String[] Batsman, String[] Bowlers) Indian Cricket Team(String[])
{Sachin Tendulkar, Dhoni, Sehwag, Yuvraj Singh, Virat Kohli, Gautam Gambhir, Suresh Raina, Rohit Sharma}
{Zaheer Khan, Irfan Pathan, Harbhajan Singh, Ashwin, Chawla, Nehra, Agarkar, Munaf Patel, Balaji, Sreesanth, RP Singh}
{Sachin Tendulkar, Dhoni, Sehwag, Yuvraj Singh, Virat Kohli, Gautam Gambhir, Suresh Raina, Rohit Sharma, Zaheer Khan, Irfan Pathan, Harbhajan Singh, Ashwin, Chawla, Nehra, Agarkar, Munaf Patel, Balaji, Sreesanth, RP Singh}
{}
{} EMPTY ARRAYS
{}
null
null - NULL ARRAYS
null



class GetCommonIndianTeam
{
    public static void main(String s[])
    {
        String[] batsman = {"Sachin Tendulkar", "Dhoni", "Sehwag", "Yuvraj Singh", "Virat Kohli", "Gautam Gambhir", "Suresh Raina", "Rohit Sharma"};
        String[] bowlers = {"Zaheer Khan", "Irfan Pathan", "Harbhajan Singh", "Ashwin", "Chawla", "Nehra", "Agarkar", "Munaf Patel", "Balaji", "Sreesanth", "RP Singh"};
        String[] cricketPlayers = getIndianCricketPlayers(batsman, bowlers);
        System.out.println("An Indian cricket team players : ");
        for(String cricketPlayer : cricketPlayers){
            System.out.println(cricketPlayer);
        }

    }


    public static String[] getIndianCricketPlayers(String[] batsman, String[] bowlers)
    {
        String[] result = null;
        return result;
    }

}

Doubts

Problems

Topic: Java String Arrays - String Arrays In Java

Read this topic
Take test on this topic

0
Wrong
Score more than 2 points

© meritcampus 2019

All Rights Reserved.

Open In App