About 19,600,000 results
Open links in new tab
  1. java - Substring of Scanner Input - Stack Overflow

    I'm trying to get the program to accept user input using the scanner class, and then print out a part of the input, but only the tail end. In this example I have the scanner asking for a debit card …

  2. Taking a user's input string and splitting it in Java

    I want to take the input from a user, in this case, their full name and split it with the .split(" ") command into 2 or 3 sections, depending on number of names, and then print out the results …

  3. Java String substring() Method - GeeksforGeeks

    Apr 11, 2025 · In Java, the substring() method of the String class returns a substring from the given string. This method is most useful when you deal with text manipulation, parsing, or data …

    Missing:

    • User

    Must include:

  4. Get Substring from String in Java - Baeldung

    Jul 21, 2024 · So far, we’ve explored various ways to extract the required substring from an input string. Sometimes, our input contains a specific substring, but instead of extracting that …

    Missing:

    • User

    Must include:

  5. java - How can I get a certain range of string input? - Stack Overflow

    Aug 31, 2015 · You can use a String::substring() method to get a portion of a string from the actual string. substring() method takes either start index or both start index and end index and …

  6. Java User Input (Scanner class) - W3Schools

    The Scanner class is used to get user input, and it is found in the java.util package. To use the Scanner class, create an object of the class and use any of the available methods found in the …

  7. How to extract substring from a string in Java | LabEx

    Substring extraction can be used to extract specific parts of the input, such as extracting a username from an email address or a date from a user-provided string. String userInput = " …

  8. Java String substring() Method - W3Schools

    The substring() method returns a substring from the string. If the end argument is not specified then the substring will end at the end of the string. One of the following: Required. The index of …

  9. Java User Input – Scanner Class - GeeksforGeeks

    Apr 22, 2025 · Import the Scanner class using import java.util.Scanner;; Create the Scanner object and connect Scanner with System.in by passing it as an argument i.e., Scanner sc = …

  10. Java program to extract a substring from a string - CodeVsColor

    In this Java programming tutorial, we will learn how to extract a substring from a user given string. The program will ask the user to enter a string and first and the second index of the substring. …

  11. Some results have been removed
Refresh