任何人都可以请更正此程序吗?错误来了" int无法解除引用"

时间:2015-05-11 16:51:51

标签: java string

import java.io.*;
    class reverse
    {
    public static void main()throws IOException
    {
    InputStreamReader read=new InputStreamReader(System.in);
    BufferedReader in=new BufferedReader(read);
    System.out.println("enter a string");
    String str=in.readLine();
    char b,c;
    int l,i; 
    l=str.length();
    for(i=0;i<l;i++)
    {
        if(Character.isUpperCase(i)==true)
        {
             b=i.toLowerCase();}
            else
          {  c=i.toUpperCase();
        }
        String s=s+i;
    }
    System.out.println(s);
    }
    }
/*wap to input a string and print the text with the uppercase and lowercase reversed,eg-INPUT:WeLcoMe,OUTPUT:wElCOmE  */ 

0 个答案:

没有答案