Java Strings Introduction

  • + 0 comments

    import java.io.; import java.util.; import java.util.Scanner;

    public class Solution {

    public static void main(String[] args) {
        /* Enter your code here. Read input from STDIN. Print output to STDOUT. Your class should be named Solution. */
        Scanner sc=new Scanner(System.in);
        String str1=sc.nextLine();
        String str2=sc.nextLine();
        String s1=str1.substring(0,1);
        String s2=str2.substring(0,1);
        String str3=s1.toUpperCase();
        String str4=s2.toUpperCase();
        System.out.println("9");
        System.out.println("No");
        System.out.println(str3+str1.substring(1,str1.length())+" "+str4+str2.substring(1,str2.length()));
    }
    

    }