From a97a3c38380a195539a7406b8810005bc460408d Mon Sep 17 00:00:00 2001 From: Ankit-5087 <85407190+Ankit-5087@users.noreply.github.com> Date: Tue, 5 Oct 2021 18:01:54 +0530 Subject: [PATCH] Create StringCheck.java Java based program to count number of characters , number of uppercase , number of lower case and total number of words entered in a string. --- StringCheck.java | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 StringCheck.java diff --git a/StringCheck.java b/StringCheck.java new file mode 100644 index 0000000..bd84f2f --- /dev/null +++ b/StringCheck.java @@ -0,0 +1,31 @@ + Contributor Info : +// Name : Ankit Raj +// Git : https://github.com/Ankit-5087 + +import java.util.*; +class String2 +{ + public static void main(String args[]) + { + Scanner sc=new Scanner (System.in); + System.out.println("PLease enter a sentence"); + String str=sc.nextLine(); + int l=str.length(); + int nou=0,nol=0,now=0; + for(int i=0;i