
-----------------------------------
AshIsMyNam3
Sat Sep 29, 2012 9:21 pm

Some Help Please :)
-----------------------------------
Hey guys!
I need some help with my java program.
Question:
I have to make a program which will classify the character a user enters as a digit, letter (and if it a letter-->lowercase/uppercase, consonant).
When the respective character is entered, the i/o window should look EXACTLY as what's shown:
--Enter f--OUTPUT:
Enter a character: f
It is a letter, lowercase, consonant.
--Enter A--OUTPUT:
Enter a character: A
It is a letter, uppercase.
--Enter 9--OUTPUT:
Enter a character: 9
It is a digit.

I was wondering if there's a way to clear screen in java (similar to "cls" in Turing). If not, is there some way to make it such that the input of the user is not shown in the I/O window?
Currently my program just prints "println" 10 times to hide the users input, but if you scroll up, it's still there.
This is my program (Yes I know it isn't brilliantly structured, but I've just started learning Java, so give me some time :D).
PROGRAM:
 	//Importing the scanner so I can use it later in the program  
	import java.util.Scanner;
   class LetterDigitDecisionAssignment
   {
      public static void main (String[] args)
      {
      	//Declaring scanner variable, asking the user to input a character and assigning a variable for the inputted character
         Scanner s1 = new Scanner(System.in);
         System.out.println ("Enter a character:");
         char ch = s1.nextLine().charAt(0);
         //Printing 10 blank lines so that I/O box looks like that on the assignment sheet
         for (int i=0; i