How do i add a ratio into this program. it needs to find the ratio from lowercase to uppercase.
import java.util.Scanner;
public class Strings
{
public static void main(String[] args)
{
// Set up a Scanner object for keyboard input.
Scanner in = new Scanner(System.in);
// Set up Strings for lower and upper case letters.
String Upper = "";
String Lower = "";
// Print a line of text.
System.out.print("Please give a string: ");
// Set up String variable to hold keyboard input.
String x = in.next();
int z = x.length();
for(int y = 0; y < z; y++)
if(Character.isUpperCase(x.charAt(y)))
{
char w = x.charAt(y);
Upper = Upper + w + " ";
}
else if(Character.isLowerCase(x.charAt(y)))
{
char w = x.charAt(y);
Lower = Lower + w + " ";
}
{System.out.println("\nThe Lowercase characters are: " + Lower);}
{System.out.println("\nThe Uppercase characters are: " + Upper);}
}
}