I think there is an error in the code above...i am just starting to learn Java so i may be wrong but this is what the code above should look like:
Code:
String s= "lslsliuyt";

for(int i=0; i<s.length; i++)

{

	if((int)s.charAt(i)>90)
	{

		int x = (int)s.charAt(i)-32;

		System.out.print((char)x);

	}

	else

		System.out.print(s.charAt(i));

}
Anyways, when you are takling about strings, there is no brakets at the end of length....

also to make a random number generator, this is what the code should look like:
Code:
import java.util.Random;

public class Arrays  //you can change the name Arrays to whatever your program is called
{
     public static void main (String args[])
      {
             Random r = new Random();
             int myVar=0;
             
             for (int i=0;i<100;i++)
             {
                    myVar=r.nextInt();//gets random *******s
                    System.out.println("A random number is: " +myVar);//prints this 99 times
             }
      }
}
Once again i dont know how this program will run...but it should look something like that hope i helped