If you read the Prologue section of the code I posted it will give you an explanation of what I am trying to accomplish with this program.
The problem I am having is that I am unable to find an example of how to pass an argument through the string class using charAt(). what i am looking to do is for every index value of the string Name that is > 0 i want to pass the command toLowercase() but my method is obviously wrong. Below is the debugging tool output
C:\Users\peter\Desktop\CSC 111\welch_lab3\Welch_lab3.java:44: illegal start of expression
Index2 = Name.charAt(>0).toLowerCase(); // puts all char after index value 0 to lowercase
^
1 error
Tool completed with exit code 1
//Prologue Section
/**********************************************************************
*Program Name: CSC 111 Lab03
*Author: Peter Welch
*Date: 2/14
*Course/Section: CSC 111-001 (002w)
*Program Description: This program is designed to Convert a STRING from one format to another and display the converted format.
*
*Initial Algorithm:
*
*BEGIN Lab03
* Begin While loop
* Input name
* Alter String
* Display altered string
* End loop when sentinel is entered
*
*END Lab03
*********************************************************************/
//Pre-Processor Declaration Section
public class Welch_lab3 // begin class definition
{
public static void main (String[] args) // begin Alter String method
{
int Sentinel = -1; // Value at witch entered exits loop
int Index1; // finds char at index value 0
int Index2; //
String Name; // Name to be converted
String Index1, Index2, Final_Name;
// Begin While loop
while (Name != Sentinel)
{
System.out.println ("Enter Name:"); // prompt for input
String Name = Keyboard.readString (); // stores name to be altered
Index1 = Name.charAt(0).toUpperCase(); // finds char value at index value 0 and makes it uppercase
Index2 = Name.charAt(>0).toLowerCase(); // puts all char after index value 0 to lowercase
Final_Name = Index1 + Index2; // string concatenation
System.out.println ("Altered string is: " + Final_Name);
} // end while loop
} // end method
} // end program