Write a string charAt() method program

Write a string charAt() method program

Program
import java.util.Scanner;
public class Main
{
    public static void main(String args[])
    {
        String s;
        char ch;
        Scanner sc=new Scanner(System.in);
        System.out.print("Enter String : ");
        s=sc.nextLine();
        ch=s.charAt(0);
        System.out.print(ch);
    }
}


Output:

Enter String : Sateesh
S


Strings Handling In Java



More Questions


174 . Write a string charAt() method program
175 . Write a string toLowerCase() Program
176 . Write a String toUpperCase() program
177 . Write a string concat() program
178 . Write a string compareTo program
179 . Write a string compareToIgnoreCase() Program
180 . Write a string equals program
181 . Write a string equalsIgnoreCase() program
182 . Write a string startsWith() program
183 . Write a string endsWith() program
184 . Write a string indexOf() program