Computer Science, asked by akashpalvarsu8764, 4 months ago

Write a program that reads a string and then prints a string capitalizes every other letter in the string, eg: school becomes sChOoL..

Answers

Answered by kamalrajatjoshi94
2

Answer:

import java.util.*;

public class Capital

{

public static void main(String args[ ])

{

Scanner in=new Scanner(System.in);

String s,uppercase;

System.out.println("Enter the String");

s=in.next();

uppercase=String.toUppercase(String s);

System.out.println("The String in uppercase:"+uppercase);

}

}

Similar questions