About 488,000 results
Open links in new tab
  1. regex - input Pattern matching java - Stack Overflow

    Jan 12, 2014 · I want to write a function validate() which will take some pattern or regular expression as argument and will ask user to input its choice. If the choice matches the pattern, …

  2. java - Pattern for User input processing - Stack Overflow

    Oct 28, 2012 · Instead of using switch statements, you could create an object which contains an array of strings for the submenus, and an array of submenu objects numbered corresponding …

  3. Design Pattern in Java for Getting Input and Acting on it

    Jul 19, 2018 · I'm trying to figure out what design pattern and implementation works for prompting the user, collecting their input, comparing it and then acting by assigning a value. Right now …

  4. Java Program to Print a Square Pattern for given integer

    Aug 5, 2022 · The given task is to take an integer as input from the user and print that integer in Java. To read and print an integer value in Java, we can use the Scanner class to take input …

  5. 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 …

  6. Different ways to take input from the user in Java

    Apr 12, 2024 · Java provides several methods and classes to facilitate input from the user, each with its own advantages and best use cases. In this article, we’ll delve into various approaches …

  7. Methods to Take Input in Java - Tpoint Tech

    In Java, there are various methods available to take input from the user. The choice of method depends on the type of input you want to receive. Here are some commonly used methods to …

  8. Reading input from user - Java - Code with Mosh Forum

    Sep 9, 2022 · Here is its Javadoc: Returns the next token if it matches the specified pattern. This method may block while waiting for input to scan, even if a previous invocation of …

  9. Design pattern for taking user input and invoking method

    Oct 19, 2009 · All you need to do is accept input real time and interpret it somehow (see Thomas' tip if you're set on a pattern). If you're trying to eliminate a big switch statement, or large if-else …

  10. 15 Pattern Programs in java - JavaGoal

    Mar 4, 2023 · Here we will discuss the top 15 Pattern Programs in Java: How to Print Star, Number, and Character. You can read Java from JavaGoal.com. 1. Pyramid Program in Java. …

  11. Some results have been removed