repl.it
@AlexLovelock/

idek week 5 or smth

Java

help

fork
loading
Files
  • Main.java
  • jdt.ls-java-project
Main.java
1
2
3
4
5
6
7
8
9
10
11
12
13
import java.util.Scanner;
 class Main {
    public static void main(String[] args) {
     
      Scanner input = new Scanner(System.in);
     
     
     System.out.println("Enter your full name");
     String name = input.nextLine();  
     System.out.println(name.substring((name.lastIndexOf("") + 1), name.length()));   
    
  }
}