+ 1
Write a code in java to print your first letter of your name..??
example: my name is rajesh sahu then i will make program for the write R...
3 Answers
0
System.out.println("Boris".charAt(0));
Edit:
import java.util.Scanner;
public class Program
{
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
String name = scan.nextLine();
char ch = scan.nextLine().charAt(0);
System.out.println(name);
name = ch + name.substring(1);
System.out.println(name);
}
}
0
sorry.....i m not saying that.......i say that you make the first letter of your name with the symbol (as your choice)..
0
Your code is not working make some changes please and post here
Thanks!