Java: Viết chương trình nhập vào một chuỗi ký tự. Đổi chuỗi thành chữ in hoa.

Người đăng: share-nhungdieuhay on Thứ Hai, 10 tháng 6, 2013

import java.io.*;
public class ReadLine{
   public static void main(String args[]){
           InputStreamReader isr = new InputStreamReader(System.in);
           BufferedReader br = new BufferedReader(isr);
           try{
                        String line = br.readLine();                                        
                        System.out.print(line.toUpperCase());
                       
           }
           catch(IOException ie){
                        System.out.print("Error: " +ie);
           }
          
   }

}

{ 0 nhận xét... read them below or add one }

Đăng nhận xét