SHOW:
|
|
- or go back to the newest paste.
1 | package deel1; | |
2 | ||
3 | import java.util.*; | |
4 | - | |
4 | + | |
5 | - | static String getInput () { |
5 | + | |
6 | - | Scanner scan = new Scanner(System.in); |
6 | + | |
7 | - | String zin = ""; |
7 | + | public static void main(String[] args) { |
8 | - | |
8 | + | String zin = getInput(); |
9 | - | boolean foundh = false; |
9 | + | String zinUitvoer = filterZin(zin); |
10 | - | System.out.println("Voer een zin in: "); |
10 | + | |
11 | - | if (scan.hasNextLine()) |
11 | + | |
12 | - | zin = scan.nextLine().trim(); |
12 | + | static String getInput() { |
13 | - | |
13 | + | Scanner scan = new Scanner(System.in); |
14 | String zin = ""; | |
15 | - | System.out.println("Geen invoer!"); |
15 | + | |
16 | - | System.exit(0); |
16 | + | System.out.println("Voer een zin in: "); |
17 | if (scan.hasNextLine()) { | |
18 | zin = scan.nextLine().trim(); | |
19 | } | |
20 | - | static String filterZin(String zin) { |
20 | + | |
21 | - | |
21 | + | |
22 | - | } |
22 | + | System.out.println("Geen invoer!"); |
23 | System.exit(0); | |
24 | } | |
25 | return zin; | |
26 | } | |
27 | ||
28 | static String filterZin(String zin) { | |
29 | ||
30 | for (int groteLetters = 65; groteLetters <= 90; groteLetters++) { | |
31 | groteLetters = groteLetters + 32; | |
32 | char kleineLetterAlfabet = (char) groteLetters; | |
33 | } | |
34 | int specialeTekens1 = 33; | |
35 | int specialeTekens2 = 58; | |
36 | int specialeTekens3 = 91; | |
37 | if (specialeTekens1 <= 47 && specialeTekens2 <= 64 && specialeTekens3 <= 96) { | |
38 | System.out.println(""); | |
39 | } | |
40 | System.out.println("Gefilterd: " + zin); | |
41 | return zin; | |
42 | } | |
43 | } |