« Home | PRINTING THE NON-PRIMES » | PRIME FACTORS OF ALL NON-PRIMES BELOW 500 » | What is Garbage Collection & Why is Garbage Collec... » | Public static void main (String args[]) » | Delete and Update values in MySql Using Java » | Insert values into table Using Java » | Program to Retrive values from Mysql Using Java » | Java Mysql Connectivity » | Program to Delete Files in a Given Directory » | Program to Write to a file » 

Saturday, March 11, 2006 

Lower Case to Uppre Case Conversion

//PROGRAM FOR PRINTING CHARACTER IN UPPER CASE GIVEN THE CHARACTER IN LOWER CASE
//AUTHOR:SIVAPHANINDRA.VEMURI

import java.io.*; /*IMPORTING THE EXISTING CLASSES*/
class Task1d /*CLASS NAMED Task1d*/
{
public static void main(String[] args)throws IOException /*MAIN FUNCTION WHICH
THROWS AN IOEXCEPTION IF SATISFIES THE CONDITION*/
{
char c; //FOR STORING THE READ CHARCATER FROM THE USER
BufferedReader br=new BufferedReader (new InputStreamReader(System.in));/*BUFFERED READER FOR TAKING THE INPUT FROM THE USER*/
System.out.println("Enter Character To Quit Press 'q'");
do
{
c=(char)br.read(); /*READ FUNCTION TO READ CHARACTER WITH "br" AS AN OBJECT OF BEFFEREDREADER*/
if(c==10||c==13) /*TO ELIMINATE THE SPACE AND ENTER UNNECESSARY CHARACTERS*/
{}
else if(c=='q')
return;
else
System.out.println("UPPER CASE IS:"+(char)(c-32)); /*CONVERTING THE GIVEN CHARACTER INTO UPPER CASE*/
}while(c!='q'); /*REPEAT UNTIL GIVEN CHARACTER IS NOT EQUAL TO 'q'*/
}
}

About me

  • I'm phanindra
  • From Hyderabad, Andhra Pradesh, India
  • An Alumini of JNTU Hyd into happening IT industry...
My profile

Visitors
Bloggeries Blog Directory BlogRankings.com singapore blog directory blog search directory
Google
 
Web conceptoftheday.blospot.com