User Profile
Collapse
-
It was actually 32, i changed it in my program to see if i made a mistake in other char tests. Thanks for the check though :) just started to program again so i forget all the checks sometimes.... -
worked like a charm, I wasnt aware that you could use it like that, appreciate your help.
thank you :D...Leave a comment:
-
public class P4
{
public static void main(String []args)
{
char x = ' ';
Scanner input = new Scanner(System. in);
System.out.prin tln("Please enter a sequence of characters.");
String a = input.nextLine( );
char c = a.charAt(0);
if(c >= 'a' && c <= 'z')
{
x =...Leave a comment:
-
Lowercase to Uppercase?
Hello, I am having a "loss of precision error" every time I try to convert a lower case to an upper case. We are not allowed to use the touppercase and tolowercase method in the program. Any advice on how to go about doing this without the error would be appreciated, thank you.
if (c >= 'a' && c <= 'z' )
{
x = c - 32;
}
c is the...
No activity results to display
Show More
Leave a comment: