mirror of
https://github.com/System-End/APCSA.git
synced 2026-04-19 19:55:17 +00:00
This lesson was hard aaaaa \n Substrings and compareTo were not easy, understand them kinda tho yay!
13 lines
348 B
Java
13 lines
348 B
Java
/* Lesson 3 Coding Activity Question 4 */
|
|
|
|
import java.util.Scanner;
|
|
|
|
public class U2_L3_Activity_Four {
|
|
|
|
public static void main(String[] args) {
|
|
Scanner scan = new Scanner(System.in);
|
|
System.out.println("Enter a sentence");
|
|
String sentence = scan.nextLine();
|
|
System.out.println(sentence.indexOf(" "));
|
|
}
|
|
}
|