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.。
Lessons length is the method for character to derive the character function inside the class Chartat to infer the position of the character within the character class.
Boolean fixed value is true or False
Java Initial quest inference whether a string of characters entered is all lowercase letters