APCSA/U2/L3/U2_L3_Activity_Three.java
End Nightshade d5e752d6e8
Lesson 3
This lesson was hard aaaaa \n Substrings and compareTo were not easy, understand them kinda tho yay!
2026-02-03 10:15:10 -07:00

15 lines
471 B
Java

/* Lesson 3 Coding Activity Question 3 */
import java.util.Scanner;
public class U2_L3_Activity_Three {
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
System.out.println("Enter first word:");
String one = scan.nextLine().toLowerCase();
System.out.println("Enter second word:");
String two = scan.nextLine().toLowerCase();
System.out.println("Result: " + one.compareTo(two));
}
}