Menu
Question Index
...


Write a program to reverse the strings having special characters.

Input (List) Output (List)
[ABC@, ABC, DE$F, MN@, MON] [@CBA, ABC, F$ED, @NM, MON]
[~A~B~C~, XYZ, !@#~, 75%23, 75/23] [~C~B~A~, XYZ, ~#@!, 32%57, 75/23]
[S@chin, Kohli, Dhon!, Y~vi, Pujara] [nihc@S, Kohli, !nohD, iv~Y, Pujara]

class ReverseStringsHavingSpecialCharacters

{    public static void main(String s[])
    {
        List list = new ArrayList();
        list.add("ABC@");
        list.add("ABC");
        list.add("DE$F");
        list.add("MN@");
        list.add("MON");
        reverseSpecialStrings(list);
        System.out.println("The list after reversing special strings is " + list);

    }


public static void reverseSpecialStrings(List<String> list) {
//Write a code here to remove numbered strings from the list
}
}


Doubts

Problems

Topic: Java ArrayList

Read this topic
Take test on this topic

0
Wrong
Score more than 2 points

© meritcampus 2019

All Rights Reserved.

Open In App