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
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
Math,
1 month ago
Computer Science,
1 month ago
Math,
1 month ago
Math,
3 months ago
Chemistry,
3 months ago
India Languages,
9 months ago
Biology,
9 months ago