[Updated] Goldman Sachs Aptitude Test Questions and Answers
Practice List of TCS Digital Coding Questions !!!
Take 50+ FREE!! Online Data Interpretation Mock test to crack any Exams.

Program Discussion :: Strings

Home > Programs > Strings

50 / 60

Write a program to enter the string remove the blank spaces from the string.

Answer:

class RemoveSpace
{
public static void main(String[] args) {
        String s1 ="java is a     Programming language";
        String s2=s1.replaceAll("\\s","");
        System.out.println("Without Space String S2 is:" " " s2);
    }
}

Asked In :: IBM

Post Your Answer Here:

Language:

Post Your Reply Here:



Language:

Post Your Reply Here:



Language:

Post Your Reply Here:



Language:

Post Your Reply Here:



Language:

Post Your Reply Here:



Language:

Post Your Reply Here: