Java program to capitalise first character of each word in a given line || Interview Question

preview_player
Показать описание
This video explains java program to capitalise first character of each word in given line.
example:
input: this is techmedevoted please subscribe
Output: This Is Techmedevoted Please Subscribe
Рекомендации по теме
Комментарии
Автор

hello sir small correction in ur code if u give all capital letters it will not work.
This is small correction in ur code.

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

import

public class StringEveryWordUpper {

public static void main(String[] args) throws IOException {
// TODO Auto-generated method stub
// StringBuffer sBuffer=new StringBuffer(new
BufferedReader reader = new BufferedReader(new
System.out.println("enter line / string");
String string = reader.readLine();
StringBuilder sBuilder = new
String[] s = string.split("\\ ");
for (int i = 0; i < s.length; i++) {
");
}


}

}

Ram-owhz
Автор

similarly how can we do it for capitalising the last word of the u pls give program that

praveenraj
Автор

Bilkul bakwas
Line change krni tak to ATI nhi hai

devrastogi