Witshaper is the Professional (Computing Skills, English Learning and Soft Skills) Skill Development Training Center. We provide Professional IT Courses and Soft Skill Training in Dehradun to Students, Employees and organization. Who wish to pursue a career in IT Technology. Witshaper is led by a motivated team of IT experts and Soft Skill Professionals. We provide high quality trainings. Our Emphasis is on giving the practical knowledge to the students, so that they will get to know in depth and never forget what they opt, we provide to the students real learning environment. Witshaper prepares students and professionals to be the part of this growing industry. Be a part of Witshaper and get your dreams successful

Monday, 18 May 2015

java program to convert letters in string capital to small and vice versa

import java.util.*;
public class Convert
{
public static void main(String args[])
{
System.out.println("Enter the String");
String s1,s2="";
char ch;
Scanner in=new Scanner(System.in);
s1=in.nextLine();
int len=s1.length();
for(int i=0;i<len;i++)
{
ch=s1.charAt(i);
if(ch>=97 && ch <=122)
{
ch-=32;
}
s2=s2+ch;

}
System.out.println("Converted string is:"+s2);
}
}

No comments:

Post a Comment