write a java program to accept a word convert to lowercase and display the new word by replacing the vowels with the character following it
Answers
hope it will help you
Write a program to accept a word and convert it into lowercase if it is in uppercase and display the new word by replacing only the vowels with characters following it using scanner class ,example:computer=cpmpvtfr (in java)
Explanation:
pls follow tannuranna 59 in my following
Answer:
import java.util.*;
public class Main
{
public static void main(String[] args)
{
char ch;
String st="";
Scanner scan=new Scanner(System.in);
String s=scan.nextLine();
s.toLowerCase();
for(int i=0;i<s.length();i++)
{
ch=s. charAt (i);
int a=ch;
if(ch=='a' ||ch=='e'||ch=='i'||ch=='o'||ch=='u')
{
ch=(char)(a+1);
st=st+ch;
}
else
{
st=st+ch;
}
}
System.out.print(st);
}
}
Explanation:
Please mark me as brainliest