convert the alternate characters of the string to upper case . The first letter of the string has to be Capital

后端 未结 2 848
情话喂你
情话喂你 2021-01-29 16:07

WAP to convert the alternate characters of the string to upper case . The first letter of the string has to be Capital. I/P:We are the worlD O/P: We ArE tHe WoRlD

2条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2021-01-29 16:52

    public static void main(String[] args) { // TODO Auto-generated method stub

        String s="We are the worLD";
        System.out.println(s);
        int j=0;
        String otherstring=null;
        int length=s.length();
        for (int i=0;i

    }

提交回复
热议问题