Import Java.io.ioexception;import java.util.*;p Ublic Class A {public static void main (string[] args) throws IOException {Scanner sc=new Scanner (system.in); System.out.println ("Please enter a string"); String Str=sc.nextline (); boolean a=true;for (int i=0;i<str.length (); i++) {char c=str.charat (i); if ( Character.islowercase (c)) Continue;else{a=false;break;}} if (a==false) System.out.println ("This string is not all lowercase letters"), ElseSystem.out.println ("This string is all lowercase");}}
Experience to learn to use Java API ...
The lesson length is the method of character the character function inside the class Chartat the method of judging the position of the character inside the character class.
Boolean fixed value is true or False
The beginning of Java quest to determine if a string of characters entered is all lowercase letters